summaryrefslogtreecommitdiff
path: root/cppuhelper/source/weak.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-09-19 12:40:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-09-19 12:40:51 +0200
commit4f86b7a86cae630c19f6f0d1b4d6672c25e2eb3c (patch)
tree674da2fa2d8915d362707f4f5ee4f9691d7cc550 /cppuhelper/source/weak.cxx
parent2d31990ad0806e74f92841fb8f87db101e1a8fc3 (diff)
cid#1371142: Move semantics for css::uno::WeakReferenceHelper
Change-Id: I442b2d8061bd7d50cbf832b345a7a63461e26224
Diffstat (limited to 'cppuhelper/source/weak.cxx')
-rw-r--r--cppuhelper/source/weak.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index 1c9b57ccadb9..9a3a8bac1fae 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -24,7 +24,9 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/queryinterface.hxx>
+
#include <algorithm>
+#include <utility>
using namespace osl;
using namespace com::sun::star::uno;
@@ -485,6 +487,14 @@ WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& r
return operator = ( xInt );
}
+WeakReferenceHelper & WeakReferenceHelper::operator =(
+ WeakReferenceHelper && other)
+{
+ clear();
+ std::swap(m_pImpl, other.m_pImpl);
+ return *this;
+}
+
WeakReferenceHelper & SAL_CALL
WeakReferenceHelper::operator= (const Reference< XInterface > & xInt)
{