Use range for loop

This commit is contained in:
Daniel Marjamäki 2019-07-22 12:24:16 +02:00
parent a81c39af09
commit 74bd2aa680
1 changed files with 1 additions and 2 deletions

View File

@ -3978,8 +3978,7 @@ const Type* SymbolDatabase::findVariableType(const Scope *start, const Token *ty
bool Scope::hasInlineOrLambdaFunction() const bool Scope::hasInlineOrLambdaFunction() const
{ {
for (std::list<Scope*>::const_iterator it = nestedList.begin(); it != nestedList.end(); ++it) { for (const Scope *s : nestedList) {
const Scope *s = *it;
// Inline function // Inline function
if (s->type == Scope::eUnconditional && Token::simpleMatch(s->bodyStart->previous(), ") {")) if (s->type == Scope::eUnconditional && Token::simpleMatch(s->bodyStart->previous(), ") {"))
return true; return true;