summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-30 09:09:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-30 11:13:09 +0200
commit1c7fdf561bc924741a121439a6cb42f96f285b58 (patch)
tree2691b6af91a0256edc71ac038bf226407a57caeb /tools
parentf3fd63d63643b0c8710d80c00a532e97728acb84 (diff)
fix PolyPolygon move operator=
and add move constructor, found by loplugin:noexceptmove Change-Id: I89507113b354c4ae080f7107c996b55ab1285738 Reviewed-on: https://gerrit.libreoffice.org/78285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/poly2.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index 0603a1dc8513..d37ba809f2fb 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -45,6 +45,11 @@ PolyPolygon::PolyPolygon( const tools::PolyPolygon& rPolyPoly )
{
}
+PolyPolygon::PolyPolygon( tools::PolyPolygon&& rPolyPoly ) noexcept
+ : mpImplPolyPolygon( std::move(rPolyPoly.mpImplPolyPolygon) )
+{
+}
+
PolyPolygon::~PolyPolygon()
{
}
@@ -341,9 +346,9 @@ PolyPolygon& PolyPolygon::operator=( const tools::PolyPolygon& rPolyPoly )
return *this;
}
-PolyPolygon& PolyPolygon::operator=( tools::PolyPolygon&& rPolyPoly )
+PolyPolygon& PolyPolygon::operator=( tools::PolyPolygon&& rPolyPoly ) noexcept
{
- mpImplPolyPolygon = rPolyPoly.mpImplPolyPolygon;
+ mpImplPolyPolygon = std::move(rPolyPoly.mpImplPolyPolygon);
return *this;
}