diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-22 15:42:36 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-23 11:48:53 +0200 |
commit | 63dfd069b3a957361881c12ccba38c5a23b9a42f (patch) | |
tree | e7a9bd1027b19f44a7c58ea9c445ded435c838bc /include/svx/dataaccessdescriptor.hxx | |
parent | tdf#127101 Change tracking: fix format reject at paragraph join (diff) | |
download | core-63dfd069b3a957361881c12ccba38c5a23b9a42f.tar.gz core-63dfd069b3a957361881c12ccba38c5a23b9a42f.zip |
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/svx/dataaccessdescriptor.hxx')
-rw-r--r-- | include/svx/dataaccessdescriptor.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/svx/dataaccessdescriptor.hxx b/include/svx/dataaccessdescriptor.hxx index 92e992c2ce74..c06e6474f3fe 100644 --- a/include/svx/dataaccessdescriptor.hxx +++ b/include/svx/dataaccessdescriptor.hxx @@ -68,7 +68,7 @@ namespace svx public: ODataAccessDescriptor(); ODataAccessDescriptor( const ODataAccessDescriptor& _rSource ); - ODataAccessDescriptor( ODataAccessDescriptor&& _rSource ); + ODataAccessDescriptor(ODataAccessDescriptor&& _rSource) noexcept; ODataAccessDescriptor( const css::uno::Reference< css::beans::XPropertySet >& _rValues ); ODataAccessDescriptor( const css::uno::Sequence< css::beans::PropertyValue >& _rValues ); @@ -76,7 +76,7 @@ namespace svx ODataAccessDescriptor( const css::uno::Any& _rValues ); ODataAccessDescriptor& operator=(const ODataAccessDescriptor& _rSource); - ODataAccessDescriptor& operator=(ODataAccessDescriptor&& _rSource); + ODataAccessDescriptor& operator=(ODataAccessDescriptor&& _rSource) noexcept; ~ODataAccessDescriptor(); |