Refactoring: Use range for loop
This commit is contained in:
parent
46bb63ceaf
commit
3fdb2da0d1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue