diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-23 11:44:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-23 16:14:41 +0000 |
commit | d17d7c63d2d15495f7faeead11672c1a9e798610 (patch) | |
tree | 9458fbd9f167a6ec21f8c7d7696fcf3634486bf7 /vcl | |
parent | c136c978751e6d3f86fd2ca6c3d468049c0d3f51 (diff) |
coverity#1371156 Missing move assignment operator
Change-Id: I187bc61678b5283843227612c243c5a09d0e7eb1
Reviewed-on: https://gerrit.libreoffice.org/29227
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/graph.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 316b5ad65ae2..791a65971294 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -183,8 +183,7 @@ Graphic::Graphic() { } -Graphic::Graphic( const Graphic& rGraphic ) : -SvDataCopyStream() +Graphic::Graphic(const Graphic& rGraphic) { if( rGraphic.IsAnimated() ) mxImpGraphic.reset(new ImpGraphic(*rGraphic.mxImpGraphic)); @@ -192,6 +191,11 @@ SvDataCopyStream() mxImpGraphic = rGraphic.mxImpGraphic; } +Graphic::Graphic(Graphic&& rGraphic) + : mxImpGraphic(std::move(rGraphic.mxImpGraphic)) +{ +} + Graphic::Graphic(const Bitmap& rBmp) : mxImpGraphic(new ImpGraphic(rBmp)) { @@ -264,6 +268,12 @@ Graphic& Graphic::operator=( const Graphic& rGraphic ) return *this; } +Graphic& Graphic::operator=(Graphic&& rGraphic) +{ + mxImpGraphic = std::move(rGraphic.mxImpGraphic); + return *this; +} + bool Graphic::operator==( const Graphic& rGraphic ) const { return (*mxImpGraphic == *rGraphic.mxImpGraphic); |