Code refactoring, no functional change intended

This commit is contained in:
Daniel Marjamäki 2018-07-13 09:20:53 +02:00
parent 42f075c3fa
commit 2b125e013a
1 changed files with 1 additions and 1 deletions

View File

@ -1203,7 +1203,7 @@ void CheckCondition::alwaysTrueFalse()
tok->astParent()
&& Token::Match(tok->astParent()->astOperand1(), "if|while")
&& !tok->isBoolean();
const bool constValExpr = Token::Match(tok, "%num%|%char%") && tok->astParent() && Token::Match(tok->astParent(),"&&|%oror%|?"); // just one number or char in boolean expression
const bool constValExpr = Token::Match(tok, "%num%|%char%") && Token::Match(tok->astParent(),"%oror%|&&|?"); // just one number or char in boolean expression
const bool compExpr = Token::Match(tok, "%comp%|!"); // a compare expression
if (!(constIfWhileExpression || constValExpr || compExpr))