Skip to content

Commit 6aa0173

Browse files
committed
valueflow.cpp: avoid unnecessary copies in valueFlowInferCondition()
1 parent 97a8571 commit 6aa0173

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

0 commit comments

Comments
 (0)