diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-23 09:11:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-23 10:17:30 +0100 |
commit | 59097e8d4c4d0570a0863ebaad1259a4436ef816 (patch) | |
tree | e4775b26d2c3f9290c31f18863f9b82cdc3f0e27 | |
parent | 5840a28fd43146e1d76beacdedacd48107e5f8c6 (diff) |
coverity#1371281 Missing move assignment operator
Change-Id: I7d0351931b0baa434bd24db05358e096cfa1b6e2
-rw-r--r-- | basegfx/source/polygon/b3dpolypolygon.cxx | 11 | ||||
-rw-r--r-- | include/basegfx/polygon/b3dpolypolygon.hxx | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/basegfx/source/polygon/b3dpolypolygon.cxx b/basegfx/source/polygon/b3dpolypolygon.cxx index aa7ee1891ac7..1ff3cac901b9 100644 --- a/basegfx/source/polygon/b3dpolypolygon.cxx +++ b/basegfx/source/polygon/b3dpolypolygon.cxx @@ -201,6 +201,11 @@ namespace basegfx { } + B3DPolyPolygon::B3DPolyPolygon(B3DPolyPolygon&& rPolyPolygon) : + mpPolyPolygon(std::move(rPolyPolygon.mpPolyPolygon)) + { + } + B3DPolyPolygon::B3DPolyPolygon(const B3DPolygon& rPolygon) : mpPolyPolygon( ImplB3DPolyPolygon(rPolygon) ) { @@ -216,6 +221,12 @@ namespace basegfx return *this; } + B3DPolyPolygon& B3DPolyPolygon::operator=(B3DPolyPolygon&& rPolyPolygon) + { + mpPolyPolygon = std::move(rPolyPolygon.mpPolyPolygon); + return *this; + } + bool B3DPolyPolygon::operator==(const B3DPolyPolygon& rPolyPolygon) const { if(mpPolyPolygon.same_object(rPolyPolygon.mpPolyPolygon)) diff --git a/include/basegfx/polygon/b3dpolypolygon.hxx b/include/basegfx/polygon/b3dpolypolygon.hxx index 9e3472dbb74c..ebab91a44ce2 100644 --- a/include/basegfx/polygon/b3dpolypolygon.hxx +++ b/include/basegfx/polygon/b3dpolypolygon.hxx @@ -46,11 +46,13 @@ namespace basegfx public: B3DPolyPolygon(); B3DPolyPolygon(const B3DPolyPolygon& rPolyPolygon); + B3DPolyPolygon(B3DPolyPolygon&& rPolygon); explicit B3DPolyPolygon(const B3DPolygon& rPolygon); ~B3DPolyPolygon(); // assignment operator B3DPolyPolygon& operator=(const B3DPolyPolygon& rPolyPolygon); + B3DPolyPolygon& operator=(B3DPolyPolygon&& rPolyPolygon); // compare operators bool operator==(const B3DPolyPolygon& rPolyPolygon) const; |