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 /cppu | |
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 'cppu')
-rw-r--r-- | cppu/source/uno/lbmap.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx index 6979c74042f9..a97d2a0dc829 100644 --- a/cppu/source/uno/lbmap.cxx +++ b/cppu/source/uno/lbmap.cxx @@ -60,13 +60,13 @@ class Mapping public: inline explicit Mapping( uno_Mapping * pMapping = nullptr ); inline Mapping( const Mapping & rMapping ); - Mapping(Mapping && other): _pMapping(other._pMapping) + Mapping(Mapping && other) noexcept : _pMapping(other._pMapping) { other._pMapping = nullptr; } inline ~Mapping(); inline Mapping & operator = ( uno_Mapping * pMapping ); Mapping & operator = ( const Mapping & rMapping ) { return operator = ( rMapping._pMapping ); } - Mapping & operator =(Mapping && other) { + Mapping & operator =(Mapping && other) noexcept { if (_pMapping != nullptr) { (*_pMapping->release)(_pMapping); } |