coverity#1371267 Missing move assignment operator

Change-Id: Iefcfd20ac17f24f4fc3faec72b15de6bfb42eeac
This commit is contained in:
Caolán McNamara 2016-11-24 12:01:57 +00:00
parent 8ceb8b2d14
commit e190825b73
2 changed files with 12 additions and 0 deletions

View File

@ -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)

View File

@ -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; }