felipealmeida pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=192c7e35f6055d1588755cd23e4e2dc29470bc6e

commit 192c7e35f6055d1588755cd23e4e2dc29470bc6e
Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br>
Date:   Sun Sep 17 06:15:26 2017 -0300

    eo-cxx: Fix assignment operator for eo::concrete
---
 src/bindings/cxx/eo_cxx/eo_concrete.hh | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/bindings/cxx/eo_cxx/eo_concrete.hh 
b/src/bindings/cxx/eo_cxx/eo_concrete.hh
index e5966a31a5..9227445de9 100644
--- a/src/bindings/cxx/eo_cxx/eo_concrete.hh
+++ b/src/bindings/cxx/eo_cxx/eo_concrete.hh
@@ -102,8 +102,8 @@ struct concrete
 
    concrete& operator=(concrete&& other)
    {
-      concrete tmp(other);
-      std::swap(*this, tmp);
+      concrete tmp(std::move(other));
+      swap(tmp);
       return *this;
    }
   
@@ -140,6 +140,15 @@ struct concrete
    {
       return _eo_raw;
    }
+
+   friend void swap(concrete& lhs, concrete& rhs)
+   {
+      lhs.swap(rhs);
+   }
+   void swap(concrete& other)
+   {
+      std::swap(_eo_raw, other._eo_raw);
+   }
 protected:
    Eo* _eo_raw; ///< The opaque <em>EO Object</em>.
 };

-- 


Reply via email to