From a929b2146e8e073bbad7192e77c9ed79acd408ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 14 Mar 2014 17:37:53 +0100 Subject: [PATCH] Improved checking of const functions in checkIncorrectLogicOperator --- lib/checkother.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index b4857dc94..58d21cd2b 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1370,10 +1370,9 @@ void CheckOther::checkIncorrectLogicOperator() if (!MathLib::isInt(value2) && !MathLib::isFloat(value2)) continue; - const std::set constStandardFunctions; - if (isSameExpression(comp1, comp2, constStandardFunctions)) + if (isSameExpression(comp1, comp2, _settings->library.functionconst)) continue; // same expressions => only report that there are same expressions - if (!isSameExpression(expr1, expr2, constStandardFunctions)) + if (!isSameExpression(expr1, expr2, _settings->library.functionconst)) continue; const bool isfloat = astIsFloat(expr1) || MathLib::isFloat(value1) || astIsFloat(expr2) || MathLib::isFloat(value2);