cid#1371252: Add move semantics
Change-Id: I7cf1b4c92fdddbef681654c780a9ee466c33ce0b
This commit is contained in:
@@ -82,6 +82,10 @@ public:
|
|||||||
@param rDescr another TypeDescription
|
@param rDescr another TypeDescription
|
||||||
*/
|
*/
|
||||||
inline TypeDescription( const TypeDescription & rDescr );
|
inline TypeDescription( const TypeDescription & rDescr );
|
||||||
|
#if defined LIBO_INTERNAL_ONLY
|
||||||
|
TypeDescription(TypeDescription && other): _pTypeDescr(other._pTypeDescr)
|
||||||
|
{ other._pTypeDescr = nullptr; }
|
||||||
|
#endif
|
||||||
/** Constructor:
|
/** Constructor:
|
||||||
|
|
||||||
@param pTypeName a type name
|
@param pTypeName a type name
|
||||||
@@ -110,6 +114,17 @@ public:
|
|||||||
inline TypeDescription & SAL_CALL operator =( const TypeDescription & rTypeDescr )
|
inline TypeDescription & SAL_CALL operator =( const TypeDescription & rTypeDescr )
|
||||||
{ return this->operator =( rTypeDescr.get() ); }
|
{ return this->operator =( rTypeDescr.get() ); }
|
||||||
|
|
||||||
|
#if defined LIBO_INTERNAL_ONLY
|
||||||
|
TypeDescription & operator =(TypeDescription && other) {
|
||||||
|
if (_pTypeDescr != nullptr) {
|
||||||
|
typelib_typedescription_release(_pTypeDescr);
|
||||||
|
}
|
||||||
|
_pTypeDescr = other._pTypeDescr;
|
||||||
|
other._pTypeDescr = nullptr;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Tests whether two type descriptions are equal.
|
/** Tests whether two type descriptions are equal.
|
||||||
|
|
||||||
@param pTypeDescr another type description
|
@param pTypeDescr another type description
|
||||||
|
Reference in New Issue
Block a user