[icinga-checkins] icinga.org: icinga2/master: Add rvalue constructor for the Task class

git at icinga.org git at icinga.org
Mon Aug 29 09:03:25 CEST 2016


Module: icinga2
Branch: master
Commit: 96ee214c57b109151035477782c73f2d820885d9
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=96ee214c57b109151035477782c73f2d820885d9

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Mon Aug 29 09:00:12 2016 +0200

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 22e9bc8..77d0c17 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<void (void)>& function, WorkQueuePriority priority, int id)
-	    : Function(function), Priority(priority), ID(id)
+	Task(boost::function<void (void)>&& function, WorkQueuePriority priority, int id)
+	    : Function(std::move(function)), Priority(priority), ID(id)
 	{ }
 
 	boost::function<void (void)> Function;



More information about the icinga-checkins mailing list