Tokenizer: Code cleanup. Use %oror% to simplify code.

This commit is contained in:
Daniel Marjamäki 2011-04-10 11:55:15 +02:00
parent f284c3a11f
commit 1d86fb1738
1 changed files with 2 additions and 2 deletions

View File

@ -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();