include/tools/poly.hxx | 2 ++ include/vcl/bitmap.hxx | 1 + tools/source/generic/poly.cxx | 6 ++++++ tools/source/generic/poly2.cxx | 6 ++++++ vcl/source/gdi/bitmap.cxx | 9 +++++++++ 5 files changed, 24 insertions(+)
New commits: commit 85cf08c19f3ba3ca9dc7b5320c0bdab90242b94a Author: Caolán McNamara <[email protected]> Date: Fri Sep 2 09:38:53 2016 +0100 coverity#1371213 Missing move assignment operator Change-Id: I2454a230cd9a524086beba1a2ca32ea0b70bf17e diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index 79da3e8..3258a84 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -159,6 +159,7 @@ public: Point& operator[]( sal_uInt16 nPos ); tools::Polygon& operator=( const tools::Polygon& rPoly ); + tools::Polygon& operator=( tools::Polygon&& rPoly ); bool operator==( const tools::Polygon& rPoly ) const; bool operator!=( const tools::Polygon& rPoly ) const { return !(Polygon::operator==( rPoly )); } @@ -246,6 +247,7 @@ public: tools::Polygon& operator[]( sal_uInt16 nPos ); tools::PolyPolygon& operator=( const tools::PolyPolygon& rPolyPoly ); + tools::PolyPolygon& operator=( tools::PolyPolygon&& rPolyPoly ); bool operator==( const tools::PolyPolygon& rPolyPoly ) const; bool operator!=( const tools::PolyPolygon& rPolyPoly ) const { return !(PolyPolygon::operator==( rPolyPoly )); } diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 25baea0..a49d998 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1525,6 +1525,12 @@ tools::Polygon& Polygon::operator=( const tools::Polygon& rPoly ) return *this; } +tools::Polygon& Polygon::operator=( tools::Polygon&& rPoly ) +{ + std::swap(mpImplPolygon, rPoly.mpImplPolygon); + return *this; +} + bool Polygon::operator==( const tools::Polygon& rPoly ) const { diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx index 08f1bb8..df7c515 100644 --- a/tools/source/generic/poly2.cxx +++ b/tools/source/generic/poly2.cxx @@ -536,6 +536,12 @@ PolyPolygon& PolyPolygon::operator=( const tools::PolyPolygon& rPolyPoly ) return *this; } +PolyPolygon& PolyPolygon::operator=( tools::PolyPolygon&& rPolyPoly ) +{ + std::swap(mpImplPolyPolygon, rPolyPoly.mpImplPolyPolygon); + return *this; +} + bool PolyPolygon::operator==( const tools::PolyPolygon& rPolyPoly ) const { if ( rPolyPoly.mpImplPolyPolygon == mpImplPolyPolygon ) commit 590fc29a66bc3301023f28a7d4c33ac0b0f5eba6 Author: Caolán McNamara <[email protected]> Date: Fri Sep 2 09:26:53 2016 +0100 coverity#1371159 Missing move assignment operator Change-Id: I1470d6a27cb5ee5a98ddb13f4f12cb0b7289b282 diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index f342650..f509e18 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 63425de..a2187f3 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
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
