include/uno/dispatcher.hxx | 17 +++++++++++++++++ include/uno/environment.hxx | 16 ++++++++++++++++ include/uno/mapping.hxx | 16 ++++++++++++++++ 3 files changed, 49 insertions(+)
New commits: commit 09a77ceaf64852fa3204c2d9221a293bb3820dae Author: Stephan Bergmann <[email protected]> Date: Fri Sep 23 18:33:48 2016 +0200 cid#1371232: Add move semantics Change-Id: I8bd9a62da64adfc52be9ba954eb8dbc92d8ecc77 diff --git a/include/uno/mapping.hxx b/include/uno/mapping.hxx index 6db166e..7ec6a11 100644 --- a/include/uno/mapping.hxx +++ b/include/uno/mapping.hxx @@ -110,6 +110,11 @@ public: */ inline Mapping( const Mapping & rMapping ); +#if defined LIBO_INTERNAL_ONLY + Mapping(Mapping && other): _pMapping(other._pMapping) + { other._pMapping = nullptr; } +#endif + /** Destructor. */ inline ~Mapping(); @@ -128,6 +133,17 @@ public: inline Mapping & SAL_CALL operator = ( const Mapping & rMapping ) { return operator = ( rMapping._pMapping ); } +#if defined LIBO_INTERNAL_ONLY + Mapping & operator =(Mapping && other) { + if (_pMapping != nullptr) { + (*_pMapping->release)(_pMapping); + } + _pMapping = other._pMapping; + other._pMapping = nullptr; + return *this; + } +#endif + /** Provides a pointer to the C mapping. The returned mapping is NOT acquired! @return UNacquired C mapping commit c53af84c9ca1a1d5090d72b03a8c483d7485f7db Author: Stephan Bergmann <[email protected]> Date: Fri Sep 23 18:33:34 2016 +0200 cid#1371196: Add move semantics Change-Id: I7bf2d6f5e5b1d10cde210c814567017680c6a74e diff --git a/include/uno/environment.hxx b/include/uno/environment.hxx index 8a83614..e8b99a6 100644 --- a/include/uno/environment.hxx +++ b/include/uno/environment.hxx @@ -94,6 +94,11 @@ public: */ inline Environment( const Environment & rEnv ); +#if defined LIBO_INTERNAL_ONLY + Environment(Environment && other): _pEnv(other._pEnv) + { other._pEnv = nullptr; } +#endif + /** Destructor: releases a set environment. */ inline ~Environment(); @@ -112,6 +117,17 @@ public: inline Environment & SAL_CALL operator = ( const Environment & rEnv ) { return operator = ( rEnv._pEnv ); } +#if defined LIBO_INTERNAL_ONLY + Environment & operator =(Environment && other) { + if (_pEnv != nullptr) { + (*_pEnv->release)(_pEnv); + } + _pEnv = other._pEnv; + other._pEnv = nullptr; + return *this; + } +#endif + /** Provides UNacquired pointer to the set C environment. @return UNacquired pointer to the C environment struct commit 4c1823923f47103a29f208b72e96e6e70773f18e Author: Stephan Bergmann <[email protected]> Date: Fri Sep 23 18:33:11 2016 +0200 cid#1371304: Add move semantics Change-Id: I60051e720e816b1bd72193cbc028ce7264ba1e6a diff --git a/include/uno/dispatcher.hxx b/include/uno/dispatcher.hxx index f7a4a0a..c32d8b3 100644 --- a/include/uno/dispatcher.hxx +++ b/include/uno/dispatcher.hxx @@ -58,6 +58,12 @@ public: inline UnoInterfaceReference( uno_Interface * pUnoI ); inline UnoInterfaceReference( UnoInterfaceReference const & ref ); +#if defined LIBO_INTERNAL_ONLY + UnoInterfaceReference(UnoInterfaceReference && other): + m_pUnoI(other.m_pUnoI) + { other.m_pUnoI = nullptr; } +#endif + inline uno_Interface * get() const { return m_pUnoI; } @@ -74,6 +80,17 @@ public: uno_Interface * pUnoI ) { return set( pUnoI ); } +#if defined LIBO_INTERNAL_ONLY + UnoInterfaceReference & operator =(UnoInterfaceReference && other) { + if (m_pUnoI != nullptr) { + (*m_pUnoI->release)(m_pUnoI); + } + m_pUnoI = other.m_pUnoI; + other.m_pUnoI = nullptr; + return *this; + } +#endif + inline void dispatch( struct _typelib_TypeDescription const * pMemberType, void * pReturn, void * pArgs [], uno_Any ** ppException ) const; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
