Tokenizer: Code cleanup. Use %oror% to simplify code.
This commit is contained in:
parent
f284c3a11f
commit
1d86fb1738
|
@ -6110,7 +6110,7 @@ void Tokenizer::simplifyIfNot()
|
|||
{
|
||||
for (Token *tok = _tokens; tok; tok = tok->next())
|
||||
{
|
||||
if (tok->str() == "(" || tok->str() == "||" || tok->str() == "&&")
|
||||
if (Token::Match(tok, "(|&&|%oror%"))
|
||||
{
|
||||
tok = tok->next();
|
||||
while (tok && tok->str() == "(")
|
||||
|
@ -6181,7 +6181,7 @@ void Tokenizer::simplifyIfNotNull()
|
|||
{
|
||||
Token *deleteFrom = NULL;
|
||||
|
||||
if (tok->str() == "(" || tok->str() == "||" || tok->str() == "&&")
|
||||
if (Token::Match(tok, "(|&&|%oror%"))
|
||||
{
|
||||
tok = tok->next();
|
||||
|
||||
|
|
Loading…
Reference in New Issue