diff options
Diffstat (limited to 'cppcanvas/source')
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfpregion.cxx | 6 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfpregion.hxx | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfpregion.cxx b/cppcanvas/source/mtfrenderer/emfpregion.cxx index efb7effe9800..6c548cd2e9be 100644 --- a/cppcanvas/source/mtfrenderer/emfpregion.cxx +++ b/cppcanvas/source/mtfrenderer/emfpregion.cxx @@ -58,10 +58,6 @@ namespace cppcanvas EMFPRegion::~EMFPRegion() { - if (combineMode) { - delete[] combineMode; - combineMode = nullptr; - } } void EMFPRegion::Read(SvStream& s) @@ -77,7 +73,7 @@ namespace cppcanvas if (parts<0 || sal_uInt32(parts)>SAL_MAX_INT32 / sizeof(sal_Int32)) parts = SAL_MAX_INT32 / sizeof(sal_Int32); - combineMode = new sal_Int32[parts]; + combineMode.reset( new sal_Int32[parts] ); for (int i = 0; i < parts; i++) { s.ReadInt32(combineMode[i]); diff --git a/cppcanvas/source/mtfrenderer/emfpregion.hxx b/cppcanvas/source/mtfrenderer/emfpregion.hxx index 876aebcdbd67..5df1639f63d1 100644 --- a/cppcanvas/source/mtfrenderer/emfpregion.hxx +++ b/cppcanvas/source/mtfrenderer/emfpregion.hxx @@ -27,7 +27,7 @@ namespace cppcanvas struct EMFPRegion : public EMFPObject { sal_Int32 parts; - sal_Int32 *combineMode; + std::unique_ptr<sal_Int32[]> combineMode; sal_Int32 initialState; float ix, iy, iw, ih; |