From 9b39461a16ddcc53c795bc2308d3ff572264cf3e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 14 Dec 2017 13:46:16 +0000 Subject: use std::unique_ptr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9f94077e7ce3b43007172a34666b502770f2c581 Reviewed-on: https://gerrit.libreoffice.org/46453 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- tools/inc/poly.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/poly.h b/tools/inc/poly.h index 4adb7184708e..5609e4a5d681 100644 --- a/tools/inc/poly.h +++ b/tools/inc/poly.h @@ -27,15 +27,15 @@ class Point; class SAL_WARN_UNUSED ImplPolygonData { public: - Point* mpPointAry; - PolyFlags* mpFlagAry; + std::unique_ptr mxPointAry; + std::unique_ptr mxFlagAry; sal_uInt16 mnPoints; }; class SAL_WARN_UNUSED ImplPolygon : public ImplPolygonData { public: - ImplPolygon() { mpPointAry = nullptr; mpFlagAry = nullptr; mnPoints = 0;}; + ImplPolygon() { mnPoints = 0; } ImplPolygon( sal_uInt16 nInitSize, bool bFlags = false ); ImplPolygon( sal_uInt16 nPoints, const Point* pPtAry, const PolyFlags* pInitFlags ); ImplPolygon( const ImplPolygon& rImplPoly ); @@ -47,7 +47,6 @@ public: ImplPolygon( const Point& rBezPt1, const Point& rCtrlPt1, const Point& rBezPt2, const Point& rCtrlPt2, sal_uInt16 nPoints ); ImplPolygon(const basegfx::B2DPolygon& rPolygon); - ~ImplPolygon(); bool operator==( const ImplPolygon& rCandidate ) const; -- cgit v1.2.3