Tokenizer: Code cleanup. Removed redundant variable
This commit is contained in:
parent
f4f8aeca03
commit
970c989023
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue