Add move semantics to toolkit Window 81/240481/1
authorRichard Huang <r.huang@samsung.com>
Thu, 6 Aug 2020 14:22:32 +0000 (15:22 +0100)
committerRichard Huang <r.huang@samsung.com>
Thu, 6 Aug 2020 14:22:32 +0000 (15:22 +0100)
Change-Id: I055c275ce957dd545ccff40c439467df3f2ef518

automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h

index 3c01e99..d4c5807 100644 (file)
@@ -80,16 +80,13 @@ Window::~Window()
 {
 }
 
-Window::Window(const Window& handle)
-: BaseHandle( handle )
-{
-}
+Window::Window( const Window& copy ) = default;
 
-Window& Window::operator=(const Window& rhs)
-{
-  BaseHandle::operator=(rhs);
-  return *this;
-}
+Window& Window::operator=( const Window& rhs ) = default;
+
+Window::Window( Window&& rhs ) = default;
+
+Window& Window::operator=( Window&& rhs ) = default;
 
 Dali::Window Window::New( PositionSize windowPosition, const std::string& name, bool isTransparent )
 {
index 000923a..b28f305 100644 (file)
@@ -61,6 +61,8 @@ public:
   ~Window();
   Window(const Window& handle);
   Window& operator=(const Window& rhs);
+  Window( Window&& rhs );
+  Window& operator=( Window&& rhs );
 
   Integration::Scene GetScene();
   Dali::RenderSurfaceInterface& GetRenderSurface();