From 0fa941367b87fe3e127a5de3ad85535bef321397 Mon Sep 17 00:00:00 2001 From: Alexander Shaposhnikov Date: Mon, 10 Apr 2017 15:24:47 -0700 Subject: [PATCH] Remove superfluous std::move Summary: Cleanup: remove superfluous std::move for return values. Reviewed By: yfeldblum Differential Revision: D4856421 fbshipit-source-id: bf2cb66f3b43eb8f3b183e22b0acd31e0a0c0958 --- folly/experimental/AtomicSharedPtr.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/folly/experimental/AtomicSharedPtr.h b/folly/experimental/AtomicSharedPtr.h index ad1f7d3d..6e4ef54a 100644 --- a/folly/experimental/AtomicSharedPtr.h +++ b/folly/experimental/AtomicSharedPtr.h @@ -106,11 +106,9 @@ class atomic_shared_ptr { SharedPtr load(std::memory_order order = std::memory_order_seq_cst) const noexcept { auto local = takeOwnedBase(order); - - auto res = get_shared_ptr(local, false); - - return std::move(res); + return get_shared_ptr(local, false); } + /* implicit */ operator SharedPtr() const { return load(); } @@ -332,7 +330,7 @@ class atomic_shared_ptr { p.get()); res = *aliasedp; } - return std::move(res); + return res; } /* Get a reference to the pointer, either from the local batch or -- 2.34.1