We run the following loop:
for (uint256 selectorIndex; selectorIndex < selectorCount; selectorIndex++) {
...
bool continueLoop = false;
...
for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
if (facets_[facetIndex].facetAddress == facetAddress_) {
....
continueLoop = true;
break;
}
}
// If functionSelectors array exists for selector then continue loop
if (continueLoop) {
continueLoop = false;
continue;
}
...
}
Each new iteration declares continueLoop again with the bool type. Instead, it is better to simply declare it outside the loop and change it accordingly on each iteration.
We run the following loop:
Each new iteration declares
continueLoopagain with thebooltype. Instead, it is better to simply declare it outside the loop and change it accordingly on each iteration.