diff --git a/lib/checkpostfixoperator.cpp b/lib/checkpostfixoperator.cpp index 0c3d798e0..60c1d009d 100644 --- a/lib/checkpostfixoperator.cpp +++ b/lib/checkpostfixoperator.cpp @@ -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% ++|--"))