Tokenizer: Code cleanup. Removed redundant variable

This commit is contained in:
Daniel Marjamäki 2011-04-10 09:20:37 +02:00
parent f4f8aeca03
commit 970c989023
1 changed files with 1 additions and 4 deletions

View File

@ -5139,13 +5139,10 @@ bool Tokenizer::simplifyConditions()
}
// Reduce "(%num% == %num%)" => "(true)"/"(false)"
const Token *tok4 = tok->tokAt(4);
if (! tok4)
break;
if (Token::Match(tok, "&&|%oror%|(") &&
(Token::Match(tok->tokAt(1), "%num% %any% %num%") ||
Token::Match(tok->tokAt(1), "%bool% %any% %bool%")) &&
Token::Match(tok4, "&&|%oror%|)|?"))
Token::Match(tok->tokAt(4), "&&|%oror%|)|?"))
{
std::string cmp = tok->strAt(2);
bool result = false;