summaryrefslogtreecommitdiff
path: root/include/tools/ref.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-25 15:08:55 +0200
committerNoel Grandin <noel@peralex.com>2016-08-29 09:23:46 +0200
commit4e07987ce8134312920682e3481c3f8e3d7b66c3 (patch)
treec82c2453445644c666c9896d56677ffbae6b86d6 /include/tools/ref.hxx
parent8ae8e5d12eea6c3416674b4ce83a29fa3e6f99b4 (diff)
cid#1371154 Missing move assignment operator
Change-Id: If434a0ee5c97018777646c96f52ddded46ce0337
Diffstat (limited to 'include/tools/ref.hxx')
-rw-r--r--include/tools/ref.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx
index f9c2c384c37e..170e53ae7837 100644
--- a/include/tools/ref.hxx
+++ b/include/tools/ref.hxx
@@ -78,6 +78,16 @@ public:
return *this;
}
+ SvRef & operator =(SvRef && rObj)
+ {
+ if (pObj != nullptr) {
+ pObj->ReleaseRef();
+ }
+ pObj = rObj.pObj;
+ rObj.pObj = nullptr;
+ return *this;
+ }
+
bool Is() const { return pObj != nullptr; }
T * get() const { return pObj; }