From 2b125e013a0028562bb4628ac8116891f57bb308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 13 Jul 2018 09:20:53 +0200 Subject: [PATCH] Code refactoring, no functional change intended --- lib/checkcondition.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkcondition.cpp b/lib/checkcondition.cpp index a481cc139..cf1ddc97c 100644 --- a/lib/checkcondition.cpp +++ b/lib/checkcondition.cpp @@ -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))