diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-27 16:25:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-27 20:48:20 +0000 |
commit | f40aba6bf6ebe6a2b0da7d5e2fe53e470fe9e0f2 (patch) | |
tree | 551f3ab6931e939aea37e571d3abbe60670d4d94 /vcl/source | |
parent | 15a2a39ce621dc78449f28301beee895e67aa64f (diff) |
coverity#1371303 Missing move assignment operator
Change-Id: I0dec3e192f3da895398a8b011c0e7275aab59d73
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 0b03cee50785..51b58c60f1ac 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -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; |