]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Context: std::move the callback param in FunctionContext's ctor 11892/head
authorKefu Chai <kchai@redhat.com>
Thu, 10 Nov 2016 11:41:05 +0000 (19:41 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 10 Nov 2016 11:41:09 +0000 (19:41 +0800)
for better performance.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/Context.h

index 16c7c43e2920dbc0272d52d373a5227e6fd4484a..48c34743b8fde524b465cb5b798b5f2963e9247d 100644 (file)
@@ -451,8 +451,8 @@ typedef C_GatherBuilderBase<Context, C_Gather > C_GatherBuilder;
 
 class FunctionContext : public Context {
 public:
-  FunctionContext(const boost::function<void(int)> &callback)
-    : m_callback(callback)
+  FunctionContext(boost::function<void(int)> &&callback)
+    : m_callback(std::move(callback))
   {
   }