Tokenizer(simplifyNot): replace "if" by "else if" and added braces.
No functional change.
This commit is contained in:
parent
b5c6d7ba49
commit
0582572867
|
@ -2833,12 +2833,18 @@ bool Tokenizer::simplifyNot()
|
|||
for (Token *tok = _tokens; tok; tok = tok->next())
|
||||
{
|
||||
if (Token::Match(tok, "if|while ( not %var%"))
|
||||
{
|
||||
tok->tokAt(2)->str("!");
|
||||
if (Token::Match(tok, "&& not %var%"))
|
||||
}
|
||||
else if (Token::Match(tok, "&& not %var%"))
|
||||
{
|
||||
tok->next()->str("!");
|
||||
if (Token::Match(tok, "|| not %var%"))
|
||||
}
|
||||
else if (Token::Match(tok, "|| not %var%"))
|
||||
{
|
||||
tok->next()->str("!");
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue