Refactoring: use range for loop
This commit is contained in:
parent
60ac463a79
commit
4c6270f9b2
|
@ -1921,9 +1921,7 @@ void CheckBufferOverrun::arrayIndexThenCheck()
|
|||
return;
|
||||
|
||||
const SymbolDatabase *symbolDatabase = mTokenizer->getSymbolDatabase();
|
||||
const std::size_t functions = symbolDatabase->functionScopes.size();
|
||||
for (std::size_t i = 0; i < functions; ++i) {
|
||||
const Scope * const scope = symbolDatabase->functionScopes[i];
|
||||
for (const Scope * const scope : symbolDatabase->functionScopes) {
|
||||
for (const Token *tok = scope->bodyStart; tok && tok != scope->bodyEnd; tok = tok->next()) {
|
||||
if (Token::simpleMatch(tok, "sizeof (")) {
|
||||
tok = tok->linkAt(1);
|
||||
|
|
Loading…
Reference in New Issue