summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-25 15:30:49 +0200
committerNoel Grandin <noel@peralex.com>2016-08-29 09:23:46 +0200
commit529cfa4a16c79600f6ac09811d027134055a8c0c (patch)
tree72ed9385be640ebfb08b5299cfdf403b323fcd63 /vcl
parente2c309adf59e21b187e050a5fe17df91d7d57f8f (diff)
cid#1371170 Missing move assignment operator
Change-Id: Iaf02d5bd3090190b6b9ad15a884d3f0444983297
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/image/ImageList.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/source/image/ImageList.cxx b/vcl/source/image/ImageList.cxx
index 07182afa01b4..dfbf7518db29 100644
--- a/vcl/source/image/ImageList.cxx
+++ b/vcl/source/image/ImageList.cxx
@@ -109,6 +109,12 @@ ImageList::ImageList( const ImageList& rImageList ) :
++mpImplData->mnRefCount;
}
+ImageList::ImageList( ImageList&& rImageList ) :
+ mpImplData( rImageList.mpImplData )
+{
+ rImageList.mpImplData = nullptr;
+}
+
ImageList::~ImageList()
{
if( mpImplData && ( 0 == --mpImplData->mnRefCount ) )
@@ -435,6 +441,17 @@ ImageList& ImageList::operator=( const ImageList& rImageList )
return *this;
}
+ImageList& ImageList::operator=( ImageList&& rImageList )
+{
+ if( mpImplData && ( 0 == --mpImplData->mnRefCount ) )
+ delete mpImplData;
+
+ mpImplData = rImageList.mpImplData;
+ rImageList.mpImplData = nullptr;
+
+ return *this;
+}
+
bool ImageList::operator==( const ImageList& rImageList ) const
{