Skip to content

Commit a0e1e5e

Browse files
committed
valueflow.cpp: avoid unnecessary copies in valueFlowFunctionReturn()
1 parent 7e46dcf commit a0e1e5e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/valueflow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5886,10 +5886,10 @@ static void valueFlowFunctionReturn(TokenList& tokenlist, ErrorLogger& errorLogg
58865886
if (programMemory.empty() && !arguments.empty())
58875887
continue;
58885888
std::vector<ValueFlow::Value> values = execute(function->functionScope, programMemory, settings);
5889-
for (const ValueFlow::Value& v : values) {
5889+
for (ValueFlow::Value& v : values) {
58905890
if (v.isUninitValue())
58915891
continue;
5892-
setFunctionReturnValue(function, tok, v, settings);
5892+
setFunctionReturnValue(function, tok, std::move(v), settings);
58935893
}
58945894
}
58955895
}

0 commit comments

Comments
 (0)