diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-29 10:35:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-30 08:12:07 +0200 |
commit | 6e4a2540d4d8ad9e141b87ac3d2123d1c96366ef (patch) | |
tree | c37720e7c9cb051f80aa1294b17b53e23b243187 /include/tools | |
parent | 0285492a45e9cc19c26e14dcdf297bcc491da4d2 (diff) |
new loplugin:noexceptmove
idea from mike kaganski
look for places where we can mark move operators as noexcept, which
makes some STL operations more efficient
Change-Id: Id732b89d1fcadd5ceb0ea2b9d159fed06136330f
Reviewed-on: https://gerrit.libreoffice.org/78251
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/globname.hxx | 4 | ||||
-rw-r--r-- | include/tools/poly.hxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/tools/globname.hxx b/include/tools/globname.hxx index 3280cb69a2f6..9672f444ccad 100644 --- a/include/tools/globname.hxx +++ b/include/tools/globname.hxx @@ -60,7 +60,7 @@ public: pImp( rObj.pImp ) { } - SvGlobalName( SvGlobalName && rObj ) : + SvGlobalName( SvGlobalName && rObj ) noexcept : pImp( std::move(rObj.pImp) ) { } @@ -75,7 +75,7 @@ public: SvGlobalName( const SvGUID & rId ); SvGlobalName & operator = ( const SvGlobalName & rObj ); - SvGlobalName & operator = ( SvGlobalName && rObj ); + SvGlobalName & operator = ( SvGlobalName && rObj ) noexcept; ~SvGlobalName(); TOOLS_DLLPUBLIC friend SvStream & operator >> ( SvStream &, SvGlobalName & ); diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index b0c6190b6eb8..aed40ece0367 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -98,7 +98,7 @@ public: sal_uInt16 nPoints ); Polygon( const tools::Polygon& rPoly ); - Polygon( tools::Polygon&& rPoly); + Polygon( tools::Polygon&& rPoly) noexcept; ~Polygon(); void SetPoint( const Point& rPt, sal_uInt16 nPos ); @@ -155,7 +155,7 @@ public: Point& operator[]( sal_uInt16 nPos ); tools::Polygon& operator=( const tools::Polygon& rPoly ); - tools::Polygon& operator=( tools::Polygon&& rPoly ); + tools::Polygon& operator=( tools::Polygon&& rPoly ) noexcept; bool operator==( const tools::Polygon& rPoly ) const; bool operator!=( const tools::Polygon& rPoly ) const { return !(Polygon::operator==( rPoly )); } |