summaryrefslogtreecommitdiff
path: root/filter/source/graphicfilter/icgm/class0.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-06 15:24:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-19 07:13:11 +0100
commitef8ed797598062273ecb43fac8dbae4dbe3bf3cb (patch)
treecd29af037c18464146f23f26fb3d9b1fbcd9f966 /filter/source/graphicfilter/icgm/class0.cxx
parentccd316d1cb310734848bd20244f509024b549b8c (diff)
loplugin:useuniqueptr in CGM
Change-Id: Iecd9251f68cd894a14fb6824151768d4cb663e0f Reviewed-on: https://gerrit.libreoffice.org/49944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/source/graphicfilter/icgm/class0.cxx')
-rw-r--r--filter/source/graphicfilter/icgm/class0.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/filter/source/graphicfilter/icgm/class0.cxx b/filter/source/graphicfilter/icgm/class0.cxx
index c6f1e4d4a6b9..baeef1249dd7 100644
--- a/filter/source/graphicfilter/icgm/class0.cxx
+++ b/filter/source/graphicfilter/icgm/class0.cxx
@@ -38,8 +38,7 @@ void CGM::ImplDoClass0()
CGMBitmapDescriptor* pBmpDesc = mpBitmapInUse->GetBitmap();
// do anything with the bitmap
mpOutAct->DrawBitmap( pBmpDesc );
- delete mpBitmapInUse;
- mpBitmapInUse = nullptr;
+ mpBitmapInUse.reset();
}
mbIsFinished = true;
mbPictureBody = false;
@@ -75,8 +74,7 @@ void CGM::ImplDoClass0()
CGMBitmapDescriptor* pBmpDesc = mpBitmapInUse->GetBitmap();
// do anything with the bitmap
mpOutAct->DrawBitmap( pBmpDesc );
- delete mpBitmapInUse;
- mpBitmapInUse = nullptr;
+ mpBitmapInUse.reset();
}
mpOutAct->EndFigure(); // close potential figures
mpOutAct->EndGrouping(); // finish potential groups