Refactoring; use range for
This commit is contained in:
parent
b0b08a3bb0
commit
5518247b96
|
@ -34,9 +34,7 @@ static const CWE CWE664(664);
|
|||
void CheckBoost::checkBoostForeachModification()
|
||||
{
|
||||
const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase();
|
||||
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) {
|
||||
for (const Token *tok = scope->classStart->next(); tok && tok != scope->classEnd; tok = tok->next()) {
|
||||
if (!Token::simpleMatch(tok, "BOOST_FOREACH ("))
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue