Fix Cppcheck warnings

This commit is contained in:
Daniel Marjamäki 2016-11-14 07:21:10 +01:00
parent 1e31c6c01c
commit 3b57273ef1
1 changed files with 2 additions and 2 deletions

View File

@ -467,7 +467,7 @@ static void setTokenValue(Token* tok, const ValueFlow::Value &value, const Setti
break;
case '>': {
const bool f = value1->isFloatValue() || value2->isFloatValue();
if (!f && !value1->isIntValue() && !value1->isIntValue())
if (!f && !value1->isIntValue() && !value2->isIntValue())
break;
if (parent->str() == ">")
result.intvalue = f ? floatValue1 > floatValue2 : value1->intvalue > value2->intvalue;
@ -482,7 +482,7 @@ static void setTokenValue(Token* tok, const ValueFlow::Value &value, const Setti
}
case '<': {
const bool f = value1->isFloatValue() || value2->isFloatValue();
if (!f && !value1->isIntValue() && !value1->isIntValue())
if (!f && !value1->isIntValue() && !value2->isIntValue())
break;
if (parent->str() == "<")
result.intvalue = f ? floatValue1 < floatValue2 : value1->intvalue < value2->intvalue;