[libsigc++2] trackable: Add missing operator=(&&) implementation.



commit 3ba3f685afd637aa3493c585ef304e702d8a4538
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Sep 1 15:19:33 2015 +0200

    trackable: Add missing operator=(&&) implementation.

 sigc++/trackable.cc |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/sigc++/trackable.cc b/sigc++/trackable.cc
index fd92029..83c87cb 100644
--- a/sigc++/trackable.cc
+++ b/sigc++/trackable.cc
@@ -51,6 +51,16 @@ trackable& trackable::operator=(const trackable& src)
   return *this;
 }
 
+trackable& trackable::operator=(trackable&& src)
+{
+  if(this != &src)
+    notify_callbacks(); //Make sure that we have finished with existing stuff before replacing it.
+
+  callback_list_ = std::move(src.callback_list_);
+
+  return *this;
+}
+
 trackable::~trackable()
 {
   notify_callbacks();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]