Skip to content

Commit 773444c

Browse files
committed
valueflow.cpp: switched check order in getKnownValueFromToken() [skip ci]
1 parent b793a80 commit 773444c

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
@@ -5745,7 +5745,7 @@ static const ValueFlow::Value* getKnownValueFromToken(const Token* tok)
57455745
if (!tok)
57465746
return nullptr;
57475747
auto it = std::find_if(tok->values().begin(), tok->values().end(), [&](const ValueFlow::Value& v) {
5748-
return (v.isIntValue() || v.isContainerSizeValue() || v.isFloatValue()) && v.isKnown();
5748+
return v.isKnown() && (v.isIntValue() || v.isContainerSizeValue() || v.isFloatValue());
57495749
});
57505750
if (it == tok->values().end())
57515751
return nullptr;

0 commit comments

Comments
 (0)