Kaydet (Commit) c606f4bf authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1371240 Missing move assignment operator

Change-Id: Icf7a55fb7c37b5642913b010a54a7690c0593474
üst 958f7a7b
......@@ -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
......
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment