Improved checking of const functions in checkIncorrectLogicOperator

This commit is contained in:
Daniel Marjamäki 2014-03-14 17:37:53 +01:00
parent c625606f45
commit a929b2146e
1 changed files with 2 additions and 3 deletions

View File

@ -1370,10 +1370,9 @@ void CheckOther::checkIncorrectLogicOperator()
if (!MathLib::isInt(value2) && !MathLib::isFloat(value2))
continue;
const std::set<std::string> 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);