summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx2
-rw-r--r--svx/source/form/dataaccessdescriptor.cxx4
-rw-r--r--svx/source/sdr/attribute/sdrformtextattribute.cxx4
-rw-r--r--svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx2
-rw-r--r--svx/source/sdr/attribute/sdrtextattribute.cxx4
5 files changed, 8 insertions, 8 deletions
diff --git a/svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx b/svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx
index 924967a1be31..dee94cd72aca 100644
--- a/svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx
+++ b/svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx
@@ -53,7 +53,7 @@ namespace drawinglayer
SdrFormTextOutlineAttribute();
SdrFormTextOutlineAttribute(const SdrFormTextOutlineAttribute& rCandidate);
SdrFormTextOutlineAttribute& operator=(const SdrFormTextOutlineAttribute& rCandidate);
- SdrFormTextOutlineAttribute& operator=(SdrFormTextOutlineAttribute&& rCandidate);
+ SdrFormTextOutlineAttribute& operator=(SdrFormTextOutlineAttribute&& rCandidate) noexcept;
~SdrFormTextOutlineAttribute();
// checks if the incarnation is default constructed
diff --git a/svx/source/form/dataaccessdescriptor.cxx b/svx/source/form/dataaccessdescriptor.cxx
index acad7b4a78f6..cbfea8c0e593 100644
--- a/svx/source/form/dataaccessdescriptor.cxx
+++ b/svx/source/form/dataaccessdescriptor.cxx
@@ -241,7 +241,7 @@ namespace svx
{
}
- ODataAccessDescriptor::ODataAccessDescriptor( ODataAccessDescriptor&& _rSource )
+ ODataAccessDescriptor::ODataAccessDescriptor(ODataAccessDescriptor&& _rSource) noexcept
:m_pImpl(std::move(_rSource.m_pImpl))
{
}
@@ -253,7 +253,7 @@ namespace svx
return *this;
}
- ODataAccessDescriptor& ODataAccessDescriptor::operator=(ODataAccessDescriptor&& _rSource)
+ ODataAccessDescriptor& ODataAccessDescriptor::operator=(ODataAccessDescriptor&& _rSource) noexcept
{
m_pImpl = std::move(_rSource.m_pImpl);
return *this;
diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx
index a82656723207..74bf9926622c 100644
--- a/svx/source/sdr/attribute/sdrformtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx
@@ -277,7 +277,7 @@ namespace drawinglayer
{
}
- SdrFormTextAttribute::SdrFormTextAttribute(SdrFormTextAttribute&& rCandidate)
+ SdrFormTextAttribute::SdrFormTextAttribute(SdrFormTextAttribute&& rCandidate) noexcept
: mpSdrFormTextAttribute(std::move(rCandidate.mpSdrFormTextAttribute))
{
}
@@ -297,7 +297,7 @@ namespace drawinglayer
return *this;
}
- SdrFormTextAttribute& SdrFormTextAttribute::operator=(SdrFormTextAttribute&& rCandidate)
+ SdrFormTextAttribute& SdrFormTextAttribute::operator=(SdrFormTextAttribute&& rCandidate) noexcept
{
mpSdrFormTextAttribute = std::move(rCandidate.mpSdrFormTextAttribute);
return *this;
diff --git a/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx b/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx
index 062a786dec10..72529a3c0652 100644
--- a/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx
@@ -108,7 +108,7 @@ namespace drawinglayer
return *this;
}
- SdrFormTextOutlineAttribute& SdrFormTextOutlineAttribute::operator=(SdrFormTextOutlineAttribute&& rCandidate)
+ SdrFormTextOutlineAttribute& SdrFormTextOutlineAttribute::operator=(SdrFormTextOutlineAttribute&& rCandidate) noexcept
{
mpSdrFormTextOutlineAttribute = std::move(rCandidate.mpSdrFormTextOutlineAttribute);
return *this;
diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx
index 4222de542697..81889f5cc52a 100644
--- a/svx/source/sdr/attribute/sdrtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrtextattribute.cxx
@@ -279,7 +279,7 @@ namespace drawinglayer
{
}
- SdrTextAttribute::SdrTextAttribute(SdrTextAttribute&& rCandidate)
+ SdrTextAttribute::SdrTextAttribute(SdrTextAttribute&& rCandidate) noexcept
: mpSdrTextAttribute(std::move(rCandidate.mpSdrTextAttribute))
{
}
@@ -299,7 +299,7 @@ namespace drawinglayer
return *this;
}
- SdrTextAttribute& SdrTextAttribute::operator=(SdrTextAttribute&& rCandidate)
+ SdrTextAttribute& SdrTextAttribute::operator=(SdrTextAttribute&& rCandidate) noexcept
{
mpSdrTextAttribute = std::move(rCandidate.mpSdrTextAttribute);
return *this;