File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -486,7 +486,8 @@ namespace ValueFlow
486486 continue ;
487487 result.valueType = Value::ValueType::FLOAT;
488488 }
489- if ((value1.isFloatValue () || value2.isFloatValue ()) && Token::Match (parent, " &|^|%|<<|>>|==|!=|%or%" ))
489+ const bool isFloat = value1.isFloatValue () || value2.isFloatValue ();
490+ if (isFloat && Token::Match (parent, " &|^|%|<<|>>|==|!=|%or%" ))
490491 continue ;
491492 const auto intValue1 = [&]() -> MathLib::bigint {
492493 return value1.isFloatValue () ? static_cast <MathLib::bigint>(value1.floatValue ) : value1.intvalue ;
@@ -539,7 +540,6 @@ namespace ValueFlow
539540 }
540541 setTokenValue (parent, std::move (result), settings);
541542 } else if (Token::Match (parent, " %op%" )) {
542- const bool isFloat = value1.isFloatValue () || value2.isFloatValue ();
543543 if (Token::Match (parent, " %comp%" )) {
544544 if (!isFloat && !value1.isIntValue () && !value2.isIntValue ())
545545 continue ;
You can’t perform that action at this time.
0 commit comments