summaryrefslogtreecommitdiff
path: root/include/svl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-08-22 15:42:36 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-08-23 11:48:53 +0200
commit63dfd069b3a957361881c12ccba38c5a23b9a42f (patch)
treee7a9bd1027b19f44a7c58ea9c445ded435c838bc /include/svl
parent61ed17cafc90d9b4303b52260f729638eed107c7 (diff)
Mark move ctors/assignments noexcept
This should enable using move semantics where possible e.g. in standard containers. According to https://en.cppreference.com/w/cpp/language/move_constructor: To make strong exception guarantee possible, user-defined move constructors should not throw exceptions. For example, std::vector relies on std::move_if_noexcept to choose between move and copy when the elements need to be relocated. Change-Id: I6e1e1cdd5cd430b139ffa2fa7031fb0bb625decb Reviewed-on: https://gerrit.libreoffice.org/77957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/itemset.hxx2
-rw-r--r--include/svl/sharedstring.hxx4
-rw-r--r--include/svl/svdde.hxx4
3 files changed, 5 insertions, 5 deletions
diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx
index 9892855657d1..94ee142a2e77 100644
--- a/include/svl/itemset.hxx
+++ b/include/svl/itemset.hxx
@@ -112,7 +112,7 @@ public:
struct Pair { sal_uInt16 wid1, wid2; };
SfxItemSet( const SfxItemSet& );
- SfxItemSet( SfxItemSet&& );
+ SfxItemSet( SfxItemSet&& ) noexcept;
SfxItemSet( SfxItemPool&);
template<sal_uInt16... WIDs> SfxItemSet(
diff --git a/include/svl/sharedstring.hxx b/include/svl/sharedstring.hxx
index 5e757f79bcf3..71aad67ba2c6 100644
--- a/include/svl/sharedstring.hxx
+++ b/include/svl/sharedstring.hxx
@@ -27,11 +27,11 @@ public:
SharedString( rtl_uString* pData, rtl_uString* pDataIgnoreCase );
explicit SharedString( const OUString& rStr );
SharedString( const SharedString& r );
- SharedString( SharedString&& r );
+ SharedString(SharedString&& r) noexcept;
~SharedString();
SharedString& operator= ( const SharedString& r );
- SharedString& operator= ( SharedString&& r );
+ SharedString& operator=(SharedString&& r) noexcept;
bool operator== ( const SharedString& r ) const;
bool operator!= ( const SharedString& r ) const;
diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx
index f27e2135700f..07b5bcfd9f73 100644
--- a/include/svl/svdde.hxx
+++ b/include/svl/svdde.hxx
@@ -61,7 +61,7 @@ public:
DdeData(SAL_UNUSED_PARAMETER const void*, SAL_UNUSED_PARAMETER long, SAL_UNUSED_PARAMETER SotClipboardFormatId = SotClipboardFormatId::STRING);
DdeData(SAL_UNUSED_PARAMETER const OUString&);
DdeData(const DdeData&);
- DdeData(DdeData&&);
+ DdeData(DdeData&&) noexcept;
~DdeData();
void const * getData() const;
@@ -70,7 +70,7 @@ public:
SotClipboardFormatId GetFormat() const;
DdeData& operator=(const DdeData&);
- DdeData& operator=(DdeData&&);
+ DdeData& operator=(DdeData&&) noexcept;
static sal_uLong GetExternalFormat(SotClipboardFormatId nFmt);
static SotClipboardFormatId GetInternalFormat(sal_uLong nFmt);