summaryrefslogtreecommitdiff
path: root/include/com
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-30 08:34:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-30 11:04:12 +0200
commitf3fd63d63643b0c8710d80c00a532e97728acb84 (patch)
treebbbff2c0f8d1e9e3658d01c8a6840c3e46067a49 /include/com
parent2d5598d0c33930626fc47cf6387a4add25af84fc (diff)
loplugin:noexceptmove in Any
but we needed to make moveAnyInternals noexcept, which is fine because uno_any_construct is already noexcept Change-Id: Iddbe7666d8649cde4e638099a17484193055f549 Reviewed-on: https://gerrit.libreoffice.org/78283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/com')
-rw-r--r--include/com/sun/star/uno/Any.h4
-rw-r--r--include/com/sun/star/uno/Any.hxx6
2 files changed, 5 insertions, 5 deletions
diff --git a/include/com/sun/star/uno/Any.h b/include/com/sun/star/uno/Any.h
index 2a8cf3d05192..577b31344ae7 100644
--- a/include/com/sun/star/uno/Any.h
+++ b/include/com/sun/star/uno/Any.h
@@ -138,8 +138,8 @@ public:
inline Any & SAL_CALL operator = ( const Any & rAny );
#if defined LIBO_INTERNAL_ONLY
- inline Any(Any && other);
- inline Any & operator =(Any && other);
+ inline Any(Any && other) noexcept;
+ inline Any & operator =(Any && other) noexcept;
#endif
/** Gets the type of the set value.
diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx
index 2467a9c3d1f4..d7b3420baecc 100644
--- a/include/com/sun/star/uno/Any.hxx
+++ b/include/com/sun/star/uno/Any.hxx
@@ -127,7 +127,7 @@ inline Any & Any::operator = ( const Any & rAny )
namespace detail {
-inline void moveAnyInternals(Any & from, Any & to) {
+inline void moveAnyInternals(Any & from, Any & to) noexcept {
uno_any_construct(&to, nullptr, nullptr, &cpp_acquire);
std::swap(from.pType, to.pType);
std::swap(from.pData, to.pData);
@@ -143,11 +143,11 @@ inline void moveAnyInternals(Any & from, Any & to) {
}
-Any::Any(Any && other) {
+Any::Any(Any && other) noexcept {
detail::moveAnyInternals(other, *this);
}
-Any & Any::operator =(Any && other) {
+Any & Any::operator =(Any && other) noexcept {
uno_any_destruct(this, &cpp_release);
detail::moveAnyInternals(other, *this);
return *this;