Kaydet (Commit) deaeae4d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Make VclPtr move assignment operator actually move

071e23fe "add move operators for VclPtr" added
(among other things) a move assignment operator that rather copied m_rInnerRef.
But if b72c6feb "manage VCL widgets using
rtl::Reference" had not pointlessly introduced a user-declared copy constructor
in the first place, all the copy/move special member functions would be
implicitly declared (as VclPtr does not have a user-declared destructor).

Change-Id: I1bec05a7a1b5b48a7b7d74e64a88f118454f8cb2
üst d8796f6e
...@@ -95,19 +95,6 @@ public: ...@@ -95,19 +95,6 @@ public:
: m_rInnerRef(pBody, SAL_NO_ACQUIRE) : m_rInnerRef(pBody, SAL_NO_ACQUIRE)
{} {}
/** Copy constructor...
*/
inline VclPtr (const VclPtr<reference_type> & handle)
: m_rInnerRef (handle.m_rInnerRef)
{}
/** Move constructor...
*/
inline VclPtr (VclPtr<reference_type> && handle)
: m_rInnerRef ( std::move(handle.m_rInnerRef) )
{
}
/** Up-casting conversion constructor: Copies interface reference. /** Up-casting conversion constructor: Copies interface reference.
Does not work for up-casts to ambiguous bases. For the special case of Does not work for up-casts to ambiguous bases. For the special case of
...@@ -180,22 +167,6 @@ public: ...@@ -180,22 +167,6 @@ public:
return *this; return *this;
} }
/** move assignment operator.
*/
VclPtr & operator =(VclPtr<reference_type> && rRef)
{
m_rInnerRef = std::move(rRef);
return *this;
}
/** copy assignment operator.
*/
VclPtr & operator =(const VclPtr<reference_type> & rRef)
{
m_rInnerRef = rRef;
return *this;
}
VclPtr & operator =(reference_type * pBody) VclPtr & operator =(reference_type * pBody)
{ {
m_rInnerRef.set(pBody); m_rInnerRef.set(pBody);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment