diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-09-23 18:33:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-09-23 18:33:11 +0200 |
commit | 4c1823923f47103a29f208b72e96e6e70773f18e (patch) | |
tree | 35f7f8f196751487f08418dfc4556e51d4db75c7 /include/uno | |
parent | 6b51e526b70f32903608a1d4715bd26cd183aae3 (diff) |
cid#1371304: Add move semantics
Change-Id: I60051e720e816b1bd72193cbc028ce7264ba1e6a
Diffstat (limited to 'include/uno')
-rw-r--r-- | include/uno/dispatcher.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/uno/dispatcher.hxx b/include/uno/dispatcher.hxx index f7a4a0a37f6f..c32d8b312b1f 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; |