From 654e5159f4d8b9599025c3808fabdd8ad65b61e6 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 10 Nov 2016 19:41:05 +0800 Subject: [PATCH] Context: std::move the callback param in FunctionContext's ctor for better performance. Signed-off-by: Kefu Chai --- src/include/Context.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/Context.h b/src/include/Context.h index 16c7c43e2920d..48c34743b8fde 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)) { } -- 2.39.5