Kaydet (Commit) 3c127bc7 authored tarafından Noel Grandin's avatar Noel Grandin

cid#1371163 Missing move assignment operator

Change-Id: Ie050cfae965adf7bc43c91f366904cf6876783c0
üst 74fbfde3
...@@ -144,6 +144,11 @@ public: ...@@ -144,6 +144,11 @@ public:
*/ */
Content( const Content& rOther ); Content( const Content& rOther );
/**
* Move constructor.
*/
Content( Content&& rOther );
/** /**
* Destructor. * Destructor.
*/ */
...@@ -156,6 +161,11 @@ public: ...@@ -156,6 +161,11 @@ public:
*/ */
Content& operator=( const Content& rOther ); Content& operator=( const Content& rOther );
/**
* Move assignment operator.
*/
Content& operator=( Content&& rOther );
/** /**
* Constructor. This method should be used, if the exception thrown * Constructor. This method should be used, if the exception thrown
* by the direct ctors of this class are to 'expensive' for your * by the direct ctors of this class are to 'expensive' for your
......
...@@ -337,6 +337,10 @@ Content::Content( const Content& rOther ) ...@@ -337,6 +337,10 @@ Content::Content( const Content& rOther )
m_xImpl = rOther.m_xImpl; m_xImpl = rOther.m_xImpl;
} }
Content::Content( Content&& rOther )
{
m_xImpl = std::move(rOther.m_xImpl);
}
// static // static
bool Content::create( const OUString& rURL, bool Content::create( const OUString& rURL,
...@@ -374,6 +378,11 @@ Content& Content::operator=( const Content& rOther ) ...@@ -374,6 +378,11 @@ Content& Content::operator=( const Content& rOther )
return *this; return *this;
} }
Content& Content::operator=( Content&& rOther )
{
m_xImpl = std::move(rOther.m_xImpl);
return *this;
}
Reference< XContent > Content::get() const Reference< XContent > Content::get() const
{ {
......
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