diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-02 09:38:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-02 15:24:51 +0100 |
commit | 85cf08c19f3ba3ca9dc7b5320c0bdab90242b94a (patch) | |
tree | d58867819c2365dcf7773ae9019e81f3b9a25462 /tools | |
parent | 590fc29a66bc3301023f28a7d4c33ac0b0f5eba6 (diff) |
coverity#1371213 Missing move assignment operator
Change-Id: I2454a230cd9a524086beba1a2ca32ea0b70bf17e
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/generic/poly.cxx | 6 | ||||
-rw-r--r-- | tools/source/generic/poly2.cxx | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 25baea04fb9f..a49d998b1354 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 08f1bb877f2d..df7c51545d92 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 ) |