Skip to content

Commit 0edd83e

Browse files
committed
ValueFlow: avoid unnecessary copy in getLifetimeObjValue()
1 parent 4d81d6d commit 0edd83e

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
@@ -1511,7 +1511,7 @@ ValueFlow::Value ValueFlow::getLifetimeObjValue(const Token *tok, bool inconclus
15111511
// There should only be one lifetime
15121512
if (values.size() != 1)
15131513
return ValueFlow::Value{};
1514-
return values.front();
1514+
return std::move(values.front());
15151515
}
15161516

15171517
template<class Predicate>

0 commit comments

Comments
 (0)