summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-09-25 20:55:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-09-25 20:55:52 +0100
commitc606f4bfa49b930ab50b98eacbfae9d6d73a180d (patch)
tree2d8c413bfa1d94d5f43b0446a88658588544506f
parent958f7a7b772cff53e441b02c322ffbd80decc9a0 (diff)
coverity#1371240 Missing move assignment operator
Change-Id: Icf7a55fb7c37b5642913b010a54a7690c0593474
-rw-r--r--sd/inc/OutlinerIterator.hxx3
-rw-r--r--sd/source/ui/view/OutlinerIterator.cxx11
2 files changed, 14 insertions, 0 deletions
diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx
index 2fc5a6cd9647..9adac49e28d4 100644
--- a/sd/inc/OutlinerIterator.hxx
+++ b/sd/inc/OutlinerIterator.hxx
@@ -81,6 +81,7 @@ public:
implementation object.
*/
Iterator (const Iterator& rIterator);
+ Iterator (Iterator&& rIterator);
/** Create a new iterator with the implementation object being the
provided one.
@@ -97,6 +98,8 @@ public:
The iterator which to assign from.
*/
Iterator& operator= (const Iterator& rIterator);
+ Iterator& operator= (Iterator&& rIterator);
+
/** Return the current position of the iterator.
@return
Returns a reference to the current position. Therefore this
diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx
index 4fd8df0e85ce..33a615ef35cd 100644
--- a/sd/source/ui/view/OutlinerIterator.cxx
+++ b/sd/source/ui/view/OutlinerIterator.cxx
@@ -73,6 +73,11 @@ Iterator::Iterator (const Iterator& rIterator)
{
}
+Iterator::Iterator (Iterator&& rIterator)
+ : mxIterator(std::move(rIterator.mxIterator))
+{
+}
+
Iterator::Iterator (IteratorImplBase* pObject)
: mxIterator(pObject)
{
@@ -94,6 +99,12 @@ Iterator& Iterator::operator= (const Iterator& rIterator)
return *this;
}
+Iterator& Iterator::operator= (Iterator&& rIterator)
+{
+ mxIterator = std::move(rIterator.mxIterator);
+ return *this;
+}
+
const IteratorPosition& Iterator::operator* () const
{
DBG_ASSERT (mxIterator, "::sd::outliner::Iterator::operator* : missing implementation object");