coverity#1371159 Missing move assignment operator

Change-Id: I1470d6a27cb5ee5a98ddb13f4f12cb0b7289b282
This commit is contained in:
Caolán McNamara
2016-09-02 09:26:53 +01:00
parent 5e9f98148b
commit 590fc29a66
2 changed files with 10 additions and 0 deletions

View File

@@ -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;

View File

@@ -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