From: Kefu Chai Date: Thu, 10 Nov 2016 11:41:05 +0000 (+0800) Subject: Context: std::move the callback param in FunctionContext's ctor X-Git-Tag: v11.1.0~349^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F11892%2Fhead;p=ceph.git Context: std::move the callback param in FunctionContext's ctor for better performance. Signed-off-by: Kefu Chai --- diff --git a/src/include/Context.h b/src/include/Context.h index 16c7c43e2920..48c34743b8fd 100644 --- a/src/include/Context.h +++ b/src/include/Context.h @@ -451,8 +451,8 @@ typedef C_GatherBuilderBase C_GatherBuilder; class FunctionContext : public Context { public: - FunctionContext(const boost::function &callback) - : m_callback(callback) + FunctionContext(boost::function &&callback) + : m_callback(std::move(callback)) { }