Remove superfluous std::move
authorAlexander Shaposhnikov <alexshap@fb.com>
Mon, 10 Apr 2017 22:24:47 +0000 (15:24 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 10 Apr 2017 23:05:44 +0000 (16:05 -0700)
Summary: Cleanup: remove superfluous std::move for return values.

Reviewed By: yfeldblum

Differential Revision: D4856421

fbshipit-source-id: bf2cb66f3b43eb8f3b183e22b0acd31e0a0c0958

folly/experimental/AtomicSharedPtr.h

index ad1f7d3..6e4ef54 100644 (file)
@@ -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