diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 185224423..c392241c6 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -1505,7 +1505,7 @@ void Preprocessor::simplifyCondition(const std::map &v for (Token *tok = const_cast(tokenizer.tokens()); tok; tok = tok->next()) { - while ((tok->str() == "(" || tok->str() == "||") && (Token::simpleMatch(tok->tokAt(2), "|| 1"))) + while (Token::Match(tok, "(|%oror% %any% %oror% 1")) { tok->deleteNext(); tok->deleteNext();