Preprocessor: Use %oror% in multiCompare pattern

This commit is contained in:
Daniel Marjamäki 2011-04-10 11:47:49 +02:00
parent ec5ddb16b4
commit e94e3eca82
1 changed files with 2 additions and 2 deletions

View File

@ -1478,8 +1478,8 @@ void Preprocessor::simplifyCondition(const std::map<std::string, std::string> &v
} }
} }
} }
else if ((!tok->previous() || tok->strAt(-1) == "||" || tok->strAt(-1) == "&&" || tok->strAt(-1) == "(") && else if ((!tok->previous() || Token::Match(tok->previous(), "&&|%oror%|(")) &&
(!tok->next() || tok->strAt(1) == "||" || tok->strAt(1) == "&&" || tok->strAt(1) == ")")) (!tok->next() || Token::Match(tok->next(), "&&|%oror%|)")))
tok->str("1"); tok->str("1");
else else
tok->deleteThis(); tok->deleteThis();