Merge pull request #507 from Dmitry-Me/omitRedundantTokenMatch
Omit redundant token match
This commit is contained in:
commit
ee129fb00d
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue