summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-11-24 12:01:57 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-11-24 12:01:57 +0000
commite190825b739712ba0c861d74fc1a589c7e94672d (patch)
treef26d542358d77e141ecf506a09298eacb9d4d223
parent8ceb8b2d141a249127822bd511e66dd855fb1e59 (diff)
coverity#1371267 Missing move assignment operator
Change-Id: Iefcfd20ac17f24f4fc3faec72b15de6bfb42eeac
-rw-r--r--connectivity/source/drivers/dbase/dindexnode.cxx11
-rw-r--r--connectivity/source/inc/dbase/dindexnode.hxx1
2 files changed, 12 insertions, 0 deletions
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index 7790f74d6aac..7c82b58553d5 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -865,6 +865,17 @@ ONDXPagePtr& ONDXPagePtr::operator=(ONDXPagePtr const & rOther)
return *this;
}
+ONDXPagePtr& ONDXPagePtr::operator=(ONDXPagePtr && rOther)
+{
+ if (mpPage != nullptr) {
+ mpPage->ReleaseRef();
+ }
+ mpPage = rOther.mpPage;
+ nPagePos = rOther.nPagePos;
+ rOther.mpPage = nullptr;
+ return *this;
+}
+
static sal_uInt32 nValue;
SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx
index 3a0e58dd9800..7adf900173d4 100644
--- a/connectivity/source/inc/dbase/dindexnode.hxx
+++ b/connectivity/source/inc/dbase/dindexnode.hxx
@@ -97,6 +97,7 @@ namespace connectivity
~ONDXPagePtr();
void Clear();
ONDXPagePtr& operator=(ONDXPagePtr const & rRef);
+ ONDXPagePtr& operator=(ONDXPagePtr && rRef);
bool Is() const { return mpPage != nullptr; }
ONDXPage * operator ->() const { assert(mpPage != nullptr); return mpPage; }