Refactoring: Use ranged for loop

This commit is contained in:
Daniel Marjamäki 2018-07-13 16:50:12 +02:00
parent e552737028
commit 4d52949be6
1 changed files with 1 additions and 3 deletions

View File

@ -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% ++|--"))