diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2018-03-25 15:18:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-25 20:21:18 +0200 |
commit | 84f7b97e4e5e7183fdd98dd2c618a2a25b1cdaed (patch) | |
tree | d2d30495069cb1fc4ea3fb5266342a0e64e153ea /svx | |
parent | 975884fbbc3f80a634258ee562037688a42027a9 (diff) |
clang-tidy modernize-use-equals-default in XPolygon
Change-Id: I82a4a56bf02c6ff2495bd7a6058640d77e8c0b73
Reviewed-on: https://gerrit.libreoffice.org/51832
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/xpolyimp.hxx | 4 | ||||
-rw-r--r-- | svx/source/xoutdev/_xpoly.cxx | 67 |
2 files changed, 11 insertions, 60 deletions
diff --git a/svx/inc/xpolyimp.hxx b/svx/inc/xpolyimp.hxx index 4b73dd6fe556..425d2a551058 100644 --- a/svx/inc/xpolyimp.hxx +++ b/svx/inc/xpolyimp.hxx @@ -55,10 +55,6 @@ class ImpXPolyPolygon { public: ::std::vector< XPolygon > aXPolyList; - - ImpXPolyPolygon() {} - ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ); - ~ImpXPolyPolygon(); }; diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index a4024a061954..63d53d8585b9 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -209,15 +209,9 @@ XPolygon::XPolygon( sal_uInt16 nSize ) { } -XPolygon::XPolygon( const XPolygon& rXPoly ) - : pImpXPolygon(rXPoly.pImpXPolygon) -{ -} +XPolygon::XPolygon( const XPolygon& ) = default; -XPolygon::XPolygon( XPolygon&& rXPoly ) - : pImpXPolygon(std::move(rXPoly.pImpXPolygon)) -{ -} +XPolygon::XPolygon( XPolygon&& ) = default; /// create a XPolygon out of a standard polygon XPolygon::XPolygon( const tools::Polygon& rPoly ) @@ -333,9 +327,7 @@ XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy, pImpXPolygon->nPoints = nPos + 1; } -XPolygon::~XPolygon() -{ -} +XPolygon::~XPolygon() = default; void XPolygon::SetPointCount( sal_uInt16 nPoints ) { @@ -455,17 +447,9 @@ Point& XPolygon::operator[]( sal_uInt16 nPos ) return pImpXPolygon->pPointAry[nPos]; } -XPolygon& XPolygon::operator=( const XPolygon& rXPoly ) -{ - pImpXPolygon = rXPoly.pImpXPolygon; - return *this; -} +XPolygon& XPolygon::operator=( const XPolygon& ) = default; -XPolygon& XPolygon::operator=( XPolygon&& rXPoly ) -{ - pImpXPolygon = std::move(rXPoly.pImpXPolygon); - return *this; -} +XPolygon& XPolygon::operator=( XPolygon&& ) = default; bool XPolygon::operator==( const XPolygon& rXPoly ) const { @@ -866,30 +850,11 @@ XPolygon::XPolygon(const basegfx::B2DPolygon& rPolygon) } // XPolyPolygon +XPolyPolygon::XPolyPolygon() = default; -ImpXPolyPolygon::ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ) - : aXPolyList( rImpXPolyPoly.aXPolyList ) -{ -} - -ImpXPolyPolygon::~ImpXPolyPolygon() -{ -} - -XPolyPolygon::XPolyPolygon() - : pImpXPolyPolygon() -{ -} +XPolyPolygon::XPolyPolygon( const XPolyPolygon& ) = default; -XPolyPolygon::XPolyPolygon( const XPolyPolygon& rXPolyPoly ) - : pImpXPolyPolygon( rXPolyPoly.pImpXPolyPolygon ) -{ -} - -XPolyPolygon::XPolyPolygon( XPolyPolygon&& rXPolyPoly ) - : pImpXPolyPolygon( std::move(rXPolyPoly.pImpXPolyPolygon) ) -{ -} +XPolyPolygon::XPolyPolygon( XPolyPolygon&& ) = default; XPolyPolygon::XPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon) : pImpXPolyPolygon() @@ -901,9 +866,7 @@ XPolyPolygon::XPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon) } } -XPolyPolygon::~XPolyPolygon() -{ -} +XPolyPolygon::~XPolyPolygon() = default; void XPolyPolygon::Insert( XPolygon&& rXPoly ) { @@ -958,17 +921,9 @@ XPolygon& XPolyPolygon::operator[]( sal_uInt16 nPos ) return pImpXPolyPolygon->aXPolyList[ nPos ]; } -XPolyPolygon& XPolyPolygon::operator=( const XPolyPolygon& rXPolyPoly ) -{ - pImpXPolyPolygon = rXPolyPoly.pImpXPolyPolygon; - return *this; -} +XPolyPolygon& XPolyPolygon::operator=( const XPolyPolygon& ) = default; -XPolyPolygon& XPolyPolygon::operator=( XPolyPolygon&& rXPolyPoly ) -{ - pImpXPolyPolygon = std::move(rXPolyPoly.pImpXPolyPolygon); - return *this; -} +XPolyPolygon& XPolyPolygon::operator=( XPolyPolygon&& ) = default; /** * Distort a polygon by scaling its coordinates relative to a reference |