diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-02 09:26:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-02 15:24:51 +0100 |
commit | 590fc29a66bc3301023f28a7d4c33ac0b0f5eba6 (patch) | |
tree | 889e10962dc5c099f4acda338ab0e94975442f68 | |
parent | 5e9f98148b332f5c4df4ef785af650fd61340907 (diff) |
coverity#1371159 Missing move assignment operator
Change-Id: I1470d6a27cb5ee5a98ddb13f4f12cb0b7289b282
-rw-r--r-- | include/vcl/bitmap.hxx | 1 | ||||
-rw-r--r-- | vcl/source/gdi/bitmap.cxx | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index f342650c0c9d..f509e1826d08 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -247,6 +247,7 @@ public: virtual ~Bitmap(); Bitmap& operator=( const Bitmap& rBitmap ); + Bitmap& operator=( Bitmap&& rBitmap ); inline bool operator!() const; inline bool operator==( const Bitmap& rBitmap ) const; inline bool operator!=( const Bitmap& rBitmap ) const; diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 63425de16629..a2187f3eceaf 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -230,6 +230,15 @@ Bitmap& Bitmap::operator=( const Bitmap& rBitmap ) return *this; } +Bitmap& Bitmap::operator=( Bitmap&& rBitmap ) +{ + maPrefSize = std::move(rBitmap.maPrefSize); + maPrefMapMode = std::move(rBitmap.maPrefMapMode); + mxImpBmp = std::move(rBitmap.mxImpBmp); + + return *this; +} + bool Bitmap::IsEqual( const Bitmap& rBmp ) const { return(IsSameInstance(rBmp) || // Includes both are nullptr |