summaryrefslogtreecommitdiff
path: root/tools/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-14 13:46:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-14 21:26:36 +0100
commit9b39461a16ddcc53c795bc2308d3ff572264cf3e (patch)
treec10ea2713a0e0ab9c3c73ea4e6558ca1c1916b61 /tools/inc
parentd858b4cadd5643ba5f0ad0a0b38499a19bae2dbe (diff)
use std::unique_ptr
Change-Id: I9f94077e7ce3b43007172a34666b502770f2c581 Reviewed-on: https://gerrit.libreoffice.org/46453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'tools/inc')
-rw-r--r--tools/inc/poly.h7
1 files changed, 3 insertions, 4 deletions
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<Point[]> mxPointAry;
+ std::unique_ptr<PolyFlags[]> 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;