Skip to content

Commit 890c19a

Browse files
committed
valueflow.cpp: switched check order in getKnownValueFromToken() [skip ci]
1 parent 981656a commit 890c19a

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
@@ -5907,7 +5907,7 @@ static const ValueFlow::Value* getKnownValueFromToken(const Token* tok)
59075907
if (!tok)
59085908
return nullptr;
59095909
auto it = std::find_if(tok->values().begin(), tok->values().end(), [&](const ValueFlow::Value& v) {
5910-
return (v.isIntValue() || v.isContainerSizeValue() || v.isFloatValue()) && v.isKnown();
5910+
return v.isKnown() && (v.isIntValue() || v.isContainerSizeValue() || v.isFloatValue());
59115911
});
59125912
if (it == tok->values().end())
59135913
return nullptr;

0 commit comments

Comments
 (0)