Skip to content

Commit ae5bc45

Browse files
committed
valueflow.cpp: switched check order in getKnownValueFromToken() [skip ci]
1 parent 829ddca commit ae5bc45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/valueflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5657,7 +5657,7 @@ static const ValueFlow::Value* getKnownValueFromToken(const Token* tok)
56575657
if (!tok)
56585658
return nullptr;
56595659
auto it = std::find_if(tok->values().begin(), tok->values().end(), [&](const ValueFlow::Value& v) {
5660-
return (v.isIntValue() || v.isContainerSizeValue() || v.isFloatValue()) && v.isKnown();
5660+
return v.isKnown() && (v.isIntValue() || v.isContainerSizeValue() || v.isFloatValue());
56615661
});
56625662
if (it == tok->values().end())
56635663
return nullptr;

0 commit comments

Comments
 (0)