From 96ee214c57b109151035477782c73f2d820885d9 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 29 Aug 2016 09:00:12 +0200 Subject: [PATCH] Add rvalue constructor for the Task class refs #12555 --- lib/base/workqueue.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/base/workqueue.hpp b/lib/base/workqueue.hpp index 22e9bc8be..77d0c17a4 100644 --- a/lib/base/workqueue.hpp +++ b/lib/base/workqueue.hpp @@ -46,8 +46,8 @@ struct Task : Priority(PriorityNormal), ID(-1) { } - Task(const boost::function& function, WorkQueuePriority priority, int id) - : Function(function), Priority(priority), ID(id) + Task(boost::function&& function, WorkQueuePriority priority, int id) + : Function(std::move(function)), Priority(priority), ID(id) { } boost::function Function;