Skip to content

Commit 5518247

Browse files
committed
Refactoring; use range for
1 parent b0b08a3 commit 5518247

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/checkboost.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ static const CWE CWE664(664);
3434
void CheckBoost::checkBoostForeachModification()
3535
{
3636
const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase();
37-
const std::size_t functions = symbolDatabase->functionScopes.size();
38-
for (std::size_t i = 0; i < functions; ++i) {
39-
const Scope * scope = symbolDatabase->functionScopes[i];
37+
for (const Scope * scope : symbolDatabase->functionScopes) {
4038
for (const Token *tok = scope->classStart->next(); tok && tok != scope->classEnd; tok = tok->next()) {
4139
if (!Token::simpleMatch(tok, "BOOST_FOREACH ("))
4240
continue;

0 commit comments

Comments
 (0)