We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9497732 commit 298021aCopy full SHA for 298021a
lib/checkstl.cpp
@@ -512,12 +512,8 @@ void CheckStl::erase()
512
const Token *decltok = variableInfo ? variableInfo->typeEndToken() : nullptr;
513
514
// Is variable an iterator?
515
- bool isIterator = false;
516
- if (decltok && Token::Match(decltok->tokAt(-2), "> :: iterator %varid%", tok2->next()->varId()))
517
- isIterator = true;
518
-
519
// If tok2->next() is an iterator, check scope
520
- if (isIterator)
+ if (decltok && Token::Match(decltok->tokAt(-2), "> :: iterator %varid%", tok2->next()->varId()))
521
EraseCheckLoop::checkScope(this, tok2->next());
522
}
523
break;
0 commit comments