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 /vcl/source | |
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 'vcl/source')
-rw-r--r-- | vcl/source/font/font.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/region.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index 914ea9880b82..1d3528b0d7d2 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -49,7 +49,7 @@ Font::Font( const vcl::Font& rFont ) : mpImplFont( rFont.mpImplFont ) { } -Font::Font( vcl::Font&& rFont ) : mpImplFont( std::move(rFont.mpImplFont) ) +Font::Font( vcl::Font&& rFont ) noexcept : mpImplFont( std::move(rFont.mpImplFont) ) { } @@ -283,7 +283,7 @@ Font& Font::operator=( const vcl::Font& rFont ) return *this; } -Font& Font::operator=( vcl::Font&& rFont ) +Font& Font::operator=( vcl::Font&& rFont ) noexcept { mpImplFont = std::move(rFont.mpImplFont); return *this; diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index 983d76305fa9..4f830a2195e8 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -365,7 +365,7 @@ Region::Region(const basegfx::B2DPolyPolygon& rPolyPoly) Region::Region(const vcl::Region&) = default; -Region::Region(vcl::Region&& rRegion) +Region::Region(vcl::Region&& rRegion) noexcept : mpB2DPolyPolygon(std::move(rRegion.mpB2DPolyPolygon)), mpPolyPolygon(std::move(rRegion.mpPolyPolygon)), mpRegionBand(std::move(rRegion.mpRegionBand)), @@ -1425,7 +1425,7 @@ void vcl::Region::SetEmpty() Region& vcl::Region::operator=( const vcl::Region& ) = default; -Region& vcl::Region::operator=( vcl::Region&& rRegion ) +Region& vcl::Region::operator=( vcl::Region&& rRegion ) noexcept { mpB2DPolyPolygon = std::move(rRegion.mpB2DPolyPolygon); mpPolyPolygon = std::move(rRegion.mpPolyPolygon); |