Skip to content

Commit af4bd50

Browse files
committed
valueflow.cpp: switched check order in getKnownValueFromToken()
1 parent beea697 commit af4bd50

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/valueflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5905,7 +5905,7 @@ static const ValueFlow::Value* getKnownValueFromToken(const Token* tok)
59055905
if (!tok)
59065906
return nullptr;
59075907
auto it = std::find_if(tok->values().begin(), tok->values().end(), [&](const ValueFlow::Value& v) {
5908-
return (v.isIntValue() || v.isContainerSizeValue() || v.isFloatValue()) && v.isKnown();
5908+
return v.isKnown() && (v.isIntValue() || v.isContainerSizeValue() || v.isFloatValue());
59095909
});
59105910
if (it == tok->values().end())
59115911
return nullptr;

0 commit comments

Comments
 (0)