Skip to content

Commit 14f1242

Browse files
committed
ValueFlow: avoid unnecessary copy in getLifetimeObjValue()
1 parent 18bf89c commit 14f1242

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
@@ -1644,7 +1644,7 @@ ValueFlow::Value ValueFlow::getLifetimeObjValue(const Token *tok, bool inconclus
16441644
// There should only be one lifetime
16451645
if (values.size() != 1)
16461646
return ValueFlow::Value{};
1647-
return values.front();
1647+
return std::move(values.front());
16481648
}
16491649

16501650
template<class Predicate>

0 commit comments

Comments
 (0)