Omit redundant token match

This commit is contained in:
Dmitry-Me 2015-02-03 15:01:09 +03:00
parent a8f10735b1
commit 5517c22524
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()) { for (const Token *tok2 = tok; tok2 && tok2 != tok->link(); tok2 = tok2->next()) {
if (Token::Match(tok2, "[;{}.] %var% = - %name% ;")) if (Token::Match(tok2, "[;{}.] %var% = - %name% ;"))
varValueElse[tok2->next()->varId()] = NOT_ZERO; 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)); varValueElse[tok2->next()->varId()] = (int)MathLib::toLongNumber(tok2->strAt(3));
} }
} }