Removed extra zero division heuristics, they seem redundant as ValueType is used

This commit is contained in:
Daniel Marjamäki 2019-10-01 17:33:58 +02:00
parent e51f75ca40
commit 07b337c580
1 changed files with 0 additions and 8 deletions

View File

@ -1611,14 +1611,6 @@ void CheckOther::checkZeroDivision()
continue;
if (!tok->valueType() || !tok->valueType()->isIntegral())
continue;
if (tok->astOperand1()->isNumber()) {
if (MathLib::isFloat(tok->astOperand1()->str()))
continue;
} else if (tok->astOperand1()->isName()) {
if (!tok->astOperand1()->valueType()->isIntegral())
continue;
} else if (!tok->astOperand1()->isArithmeticalOp())
continue;
// Value flow..
const ValueFlow::Value *value = tok->astOperand2()->getValue(0LL);