[Libreoffice-commits] core.git: include/com

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 30 09:04:58 UTC 2019


 include/com/sun/star/uno/Any.h   |    4 ++--
 include/com/sun/star/uno/Any.hxx |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit f3fd63d63643b0c8710d80c00a532e97728acb84
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Aug 30 08:34:09 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Aug 30 11:04:12 2019 +0200

    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 at collabora.co.uk>

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;


More information about the Libreoffice-commits mailing list