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

coverity#1371303 Missing move assignment operator

Change-Id: I0dec3e192f3da895398a8b011c0e7275aab59d73
üst 15a2a39c
......@@ -55,6 +55,7 @@ private:
ImpGraphic();
ImpGraphic( const ImpGraphic& rImpGraphic );
ImpGraphic( ImpGraphic&& rImpGraphic );
ImpGraphic( const Bitmap& rBmp );
ImpGraphic( const BitmapEx& rBmpEx );
ImpGraphic(const SvgDataPtr& rSvgDataPtr);
......@@ -65,6 +66,7 @@ public:
private:
ImpGraphic& operator=( const ImpGraphic& rImpGraphic );
ImpGraphic& operator=( ImpGraphic&& rImpGraphic );
bool operator==( const ImpGraphic& rImpGraphic ) const;
bool operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); }
......
......@@ -128,6 +128,25 @@ ImpGraphic::ImpGraphic(const ImpGraphic& rImpGraphic)
}
}
ImpGraphic::ImpGraphic(ImpGraphic&& rImpGraphic)
: maMetaFile(std::move(rImpGraphic.maMetaFile))
, maEx(std::move(rImpGraphic.maEx))
, maSwapInfo(std::move(rImpGraphic.maSwapInfo))
, mpAnimation(std::move(rImpGraphic.mpAnimation))
, mpContext(std::move(rImpGraphic.mpContext))
, mpSwapFile(std::move(rImpGraphic.mpSwapFile))
, mpGfxLink(std::move(rImpGraphic.mpGfxLink))
, meType(rImpGraphic.meType)
, mnSizeBytes(rImpGraphic.mnSizeBytes)
, mbSwapOut(rImpGraphic.mbSwapOut)
, mbDummyContext(rImpGraphic.mbDummyContext)
, maSvgData(std::move(rImpGraphic.maSvgData))
, maPdfData(std::move(rImpGraphic.maPdfData))
{
rImpGraphic.ImplClear();
rImpGraphic.mbDummyContext = false;
}
ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) :
maEx ( rBitmap ),
meType ( !rBitmap.IsEmpty() ? GraphicType::Bitmap : GraphicType::NONE ),
......@@ -217,6 +236,28 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic )
return *this;
}
ImpGraphic& ImpGraphic::operator=(ImpGraphic&& rImpGraphic)
{
maMetaFile = std::move(rImpGraphic.maMetaFile);
meType = rImpGraphic.meType;
mnSizeBytes = rImpGraphic.mnSizeBytes;
maSwapInfo = std::move(rImpGraphic.maSwapInfo);
mpContext = std::move(rImpGraphic.mpContext);
mbDummyContext = rImpGraphic.mbDummyContext;
mpAnimation = std::move(rImpGraphic.mpAnimation);
maEx = std::move(rImpGraphic.maEx);
mbSwapOut = rImpGraphic.mbSwapOut;
mpSwapFile = std::move(rImpGraphic.mpSwapFile);
mpGfxLink = std::move(rImpGraphic.mpGfxLink);
maSvgData = std::move(rImpGraphic.maSvgData);
maPdfData = std::move(rImpGraphic.maPdfData);
rImpGraphic.ImplClear();
rImpGraphic.mbDummyContext = false;
return *this;
}
bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
{
bool bRet = false;
......
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