minor code cleanup

This commit is contained in:
Daniel Marjamäki 2017-12-31 12:30:02 +01:00
parent 791c633d18
commit 79f6793076
1 changed files with 1 additions and 2 deletions

View File

@ -1234,13 +1234,12 @@ void CheckBufferOverrun::checkGlobalAndLocalVariable()
for (const Token *tok = scope->classStart; tok != scope->classEnd; tok = tok->next()) {
// if the previous token exists, it must be either a variable name or "[;{}]"
if (tok->previous() && !tok->previous()->isName() && !Token::Match(tok->previous(), "[;{}]"))
if (tok->previous() && !Token::Match(tok->previous(), "%name%|;|{|}"))
continue;
// size : Max array index
MathLib::bigint size = 0;
// nextTok : used to skip to next statement.
const Token * nextTok = tok;