Merge pull request #507 from Dmitry-Me/omitRedundantTokenMatch

Omit redundant token match
This commit is contained in:
PKEuS 2015-02-03 14:17:43 +01:00
commit ee129fb00d
1 changed files with 1 additions and 1 deletions

View File

@ -1332,7 +1332,7 @@ bool CheckUninitVar::checkScopeForVariable(const Token *tok, const Variable& var
for (const Token *tok2 = tok; tok2 && tok2 != tok->link(); tok2 = tok2->next()) {
if (Token::Match(tok2, "[;{}.] %var% = - %name% ;"))
varValueElse[tok2->next()->varId()] = NOT_ZERO;
if (Token::Match(tok2, "[;{}.] %var% = %num% ;"))
else if (Token::Match(tok2, "[;{}.] %var% = %num% ;"))
varValueElse[tok2->next()->varId()] = (int)MathLib::toLongNumber(tok2->strAt(3));
}
}