summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-25 15:16:51 +0200
committerNoel Grandin <noel@peralex.com>2016-08-29 09:23:46 +0200
commit3c127bc71d04167a731c4b58c77104e59d42dad7 (patch)
treee4bb0a413cfe1756653603e9618d43ddd4231fac
parent74fbfde33205e0af1c44fbbe47963c827c7efedc (diff)
cid#1371163 Missing move assignment operator
Change-Id: Ie050cfae965adf7bc43c91f366904cf6876783c0
-rw-r--r--include/ucbhelper/content.hxx10
-rw-r--r--ucbhelper/source/client/content.cxx9
2 files changed, 19 insertions, 0 deletions
diff --git a/include/ucbhelper/content.hxx b/include/ucbhelper/content.hxx
index d407c6c5c80c..2d1eb030b261 100644
--- a/include/ucbhelper/content.hxx
+++ b/include/ucbhelper/content.hxx
@@ -145,6 +145,11 @@ public:
Content( const Content& rOther );
/**
+ * Move constructor.
+ */
+ Content( Content&& rOther );
+
+ /**
* Destructor.
*/
~Content();
@@ -157,6 +162,11 @@ public:
Content& operator=( const Content& rOther );
/**
+ * Move assignment operator.
+ */
+ Content& operator=( Content&& rOther );
+
+ /**
* Constructor. This method should be used, if the exception thrown
* by the direct ctors of this class are to 'expensive' for your
* application
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index 080e9e57e096..82af44ced486 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -337,6 +337,10 @@ Content::Content( const Content& rOther )
m_xImpl = rOther.m_xImpl;
}
+Content::Content( Content&& rOther )
+{
+ m_xImpl = std::move(rOther.m_xImpl);
+}
// static
bool Content::create( const OUString& rURL,
@@ -374,6 +378,11 @@ Content& Content::operator=( const Content& rOther )
return *this;
}
+Content& Content::operator=( Content&& rOther )
+{
+ m_xImpl = std::move(rOther.m_xImpl);
+ return *this;
+}
Reference< XContent > Content::get() const
{