Refactoring: Use continue in loop

This commit is contained in:
Daniel Marjamäki 2017-07-26 20:29:13 +02:00
parent 2f38d3d80e
commit 2d4f64027a
1 changed files with 27 additions and 28 deletions

View File

@ -386,7 +386,8 @@ void CheckStl::stlOutOfBounds()
tok = tok->next(); tok = tok->next();
// check if the for loop condition is wrong // check if the for loop condition is wrong
if (Token::Match(tok, "%var% <= %var% . %name% ( ) ;|)|%oror%")) { if (!Token::Match(tok, "%var% <= %var% . %name% ( ) ;|)|%oror%"))
continue;
// Is it a vector? // Is it a vector?
const Variable *var = tok->tokAt(2)->variable(); const Variable *var = tok->tokAt(2)->variable();
if (!var) if (!var)
@ -420,8 +421,6 @@ void CheckStl::stlOutOfBounds()
} }
} }
} }
continue;
}
} }
} }