Skip to content

Commit 4d52949

Browse files
committed
Refactoring: Use ranged for loop
1 parent e552737 commit 4d52949

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/checkpostfixoperator.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ void CheckPostfixOperator::postfixOperator()
5050

5151
const SymbolDatabase *symbolDatabase = mTokenizer->getSymbolDatabase();
5252

53-
const std::size_t functions = symbolDatabase->functionScopes.size();
54-
for (std::size_t i = 0; i < functions; ++i) {
55-
const Scope * scope = symbolDatabase->functionScopes[i];
53+
for (const Scope * scope : symbolDatabase->functionScopes) {
5654
for (const Token* tok = scope->bodyStart->next(); tok != scope->bodyEnd; tok = tok->next()) {
5755
const Variable *var = tok->variable();
5856
if (!var || !Token::Match(tok, "%var% ++|--"))

0 commit comments

Comments
 (0)