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 /sw | |
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 'sw')
-rw-r--r-- | sw/inc/IDocumentMarkAccess.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx index a347c81d5bb3..4d12a236a4f1 100644 --- a/sw/inc/IDocumentMarkAccess.hxx +++ b/sw/inc/IDocumentMarkAccess.hxx @@ -76,8 +76,8 @@ class IDocumentMarkAccess iterator(std::vector<::sw::mark::MarkBase*>::const_iterator const& rIter); iterator(iterator const& rOther); iterator& operator=(iterator const& rOther); - iterator(iterator && rOther); - iterator& operator=(iterator && rOther); + iterator(iterator && rOther) noexcept; + iterator& operator=(iterator && rOther) noexcept; ~iterator(); // FIXME unfortunately there's a requirement on input iterator diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 46b1d0ffb372..deb1048da936 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -80,12 +80,12 @@ auto IDocumentMarkAccess::iterator::operator=(iterator const& rOther) -> iterato return *this; } -IDocumentMarkAccess::iterator::iterator(iterator && rOther) +IDocumentMarkAccess::iterator::iterator(iterator && rOther) noexcept : m_pIter(std::move(rOther.m_pIter)) { } -auto IDocumentMarkAccess::iterator::operator=(iterator && rOther) -> iterator& +auto IDocumentMarkAccess::iterator::operator=(iterator && rOther) noexcept -> iterator& { m_pIter = std::move(rOther.m_pIter); return *this; |