Skip to content

Commit 0e52420

Browse files
committed
valueflow.cpp: avoid unnecessary copies in valueFlowFunctionReturn()
1 parent 59f14d9 commit 0e52420

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
@@ -5864,10 +5864,10 @@ static void valueFlowFunctionReturn(TokenList& tokenlist, ErrorLogger& errorLogg
58645864
if (programMemory.empty() && !arguments.empty())
58655865
continue;
58665866
std::vector<ValueFlow::Value> values = execute(function->functionScope, programMemory, settings);
5867-
for (const ValueFlow::Value& v : values) {
5867+
for (ValueFlow::Value& v : values) {
58685868
if (v.isUninitValue())
58695869
continue;
5870-
setFunctionReturnValue(function, tok, v, settings);
5870+
setFunctionReturnValue(function, tok, std::move(v), settings);
58715871
}
58725872
}
58735873
}

0 commit comments

Comments
 (0)