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 /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 'tools')
-rw-r--r-- | tools/source/generic/poly.cxx | 4 | ||||
-rw-r--r-- | tools/source/ref/globname.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 6f2d3115dfcf..0a597fdff1fc 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -872,7 +872,7 @@ Polygon::Polygon( const tools::Polygon& rPoly ) : mpImplPolygon(rPoly.mpImplPoly { } -Polygon::Polygon( tools::Polygon&& rPoly) +Polygon::Polygon( tools::Polygon&& rPoly) noexcept : mpImplPolygon(std::move(rPoly.mpImplPolygon)) { } @@ -1555,7 +1555,7 @@ tools::Polygon& Polygon::operator=( const tools::Polygon& rPoly ) return *this; } -tools::Polygon& Polygon::operator=( tools::Polygon&& rPoly ) +tools::Polygon& Polygon::operator=( tools::Polygon&& rPoly ) noexcept { mpImplPolygon = std::move(rPoly.mpImplPolygon); return *this; diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx index 47f1da1577e5..0a87bcf17b5d 100644 --- a/tools/source/ref/globname.cxx +++ b/tools/source/ref/globname.cxx @@ -105,7 +105,7 @@ SvGlobalName & SvGlobalName::operator = ( const SvGlobalName & rObj ) return *this; } -SvGlobalName & SvGlobalName::operator = ( SvGlobalName && rObj ) +SvGlobalName & SvGlobalName::operator = ( SvGlobalName && rObj ) noexcept { pImp = std::move(rObj.pImp); return *this; |