Improved checking of const functions in checkIncorrectLogicOperator
This commit is contained in:
parent
c625606f45
commit
a929b2146e
|
@ -1370,10 +1370,9 @@ void CheckOther::checkIncorrectLogicOperator()
|
||||||
if (!MathLib::isInt(value2) && !MathLib::isFloat(value2))
|
if (!MathLib::isInt(value2) && !MathLib::isFloat(value2))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const std::set<std::string> constStandardFunctions;
|
if (isSameExpression(comp1, comp2, _settings->library.functionconst))
|
||||||
if (isSameExpression(comp1, comp2, constStandardFunctions))
|
|
||||||
continue; // same expressions => only report that there are same expressions
|
continue; // same expressions => only report that there are same expressions
|
||||||
if (!isSameExpression(expr1, expr2, constStandardFunctions))
|
if (!isSameExpression(expr1, expr2, _settings->library.functionconst))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const bool isfloat = astIsFloat(expr1) || MathLib::isFloat(value1) || astIsFloat(expr2) || MathLib::isFloat(value2);
|
const bool isfloat = astIsFloat(expr1) || MathLib::isFloat(value1) || astIsFloat(expr2) || MathLib::isFloat(value2);
|
||||||
|
|
Loading…
Reference in New Issue