summaryrefslogtreecommitdiff
path: root/svx/source/sdr
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-03 15:55:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-06 12:40:33 +0200
commit2855fa6eef83ec670d927b46dc7f987c66d93057 (patch)
tree3778a32a82115ed8db5897bdce5a1ca3d4db2a8a /svx/source/sdr
parentfc79121c95d111d519e58478b48957d2d4f8612d (diff)
loplugin:useuniqueptr in DeleteOnDeinit
Change-Id: If7428654a2577ba67aea57904d2a2b5099c4d602 Reviewed-on: https://gerrit.libreoffice.org/58568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/sdr')
-rw-r--r--svx/source/sdr/primitive2d/sdrprimitivetools.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
index 8eecbeee0715..e46c426191af 100644
--- a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
+++ b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
@@ -19,6 +19,7 @@
#include <sdr/primitive2d/sdrprimitivetools.hxx>
#include <osl/mutex.hxx>
+#include <o3tl/make_unique.hxx>
#include <vcl/lazydelete.hxx>
#include <vcl/BitmapTools.hxx>
@@ -56,7 +57,7 @@ namespace drawinglayer
BitmapEx aBitmap = vcl::bitmap::CreateFromData(cross, 3, 3, 12, 32);
// create and exchange at aRetVal
- delete aRetVal.set(new BitmapEx(aBitmap));
+ aRetVal.set(o3tl::make_unique<BitmapEx>(aBitmap));
}
return aRetVal.get() ? *aRetVal.get() : BitmapEx();