Skip to content

Commit 5017e3e

Browse files
committed
valueflow.cpp: avoid unnecessary copies in valueFlowInferCondition()
1 parent 6983ca2 commit 5017e3e

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
@@ -5078,7 +5078,7 @@ static void valueFlowInferCondition(TokenList& tokenlist, const Settings& settin
50785078
for (const ValuePtr<InferModel>& model : iteratorModels) {
50795079
std::vector<ValueFlow::Value> result =
50805080
infer(model, tok->str(), tok->astOperand1()->values(), tok->astOperand2()->values());
5081-
for (ValueFlow::Value value : result) {
5081+
for (ValueFlow::Value& value : result) {
50825082
value.valueType = ValueFlow::Value::ValueType::INT;
50835083
setTokenValue(tok, std::move(value), settings);
50845084
}

0 commit comments

Comments
 (0)