diff --git a/lib/check64bit.cpp b/lib/check64bit.cpp index 21441bf2d..26b2786ee 100644 --- a/lib/check64bit.cpp +++ b/lib/check64bit.cpp @@ -49,9 +49,7 @@ void Check64BitPortability::pointerassignment() const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase(); // Check return values - 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) { if (scope->function == nullptr || !scope->function->hasBody()) // We only look for functions with a body continue; @@ -89,8 +87,7 @@ void Check64BitPortability::pointerassignment() } // Check assignments - 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->classStart; tok && tok != scope->classEnd; tok = tok->next()) { if (tok->str() != "=") continue;