Refactoring: Use ranged for loop
This commit is contained in:
parent
e552737028
commit
4d52949be6
|
@ -50,9 +50,7 @@ void CheckPostfixOperator::postfixOperator()
|
|||
|
||||
const SymbolDatabase *symbolDatabase = mTokenizer->getSymbolDatabase();
|
||||
|
||||
const std::size_t functions = symbolDatabase->functionScopes.size();
|
||||
for (std::size_t i = 0; i < functions; ++i) {
|
||||
const Scope * scope = symbolDatabase->functionScopes[i];
|
||||
for (const Scope * scope : symbolDatabase->functionScopes) {
|
||||
for (const Token* tok = scope->bodyStart->next(); tok != scope->bodyEnd; tok = tok->next()) {
|
||||
const Variable *var = tok->variable();
|
||||
if (!var || !Token::Match(tok, "%var% ++|--"))
|
||||
|
|
Loading…
Reference in New Issue