diff options
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/polygon/b2dpolygoncutandtouch.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx index 0ccebe9fb38d..71804b3fe970 100644 --- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx +++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx @@ -29,6 +29,7 @@ #include <vector> #include <algorithm> +#include <memory> #define SUBDIVIDE_FOR_CUT_TEST_COUNT (50) @@ -887,7 +888,7 @@ namespace basegfx else { // first solve self cuts and self touches for all contained single polygons - temporaryPolygonData *pTempData = new temporaryPolygonData[nCount]; + std::unique_ptr<temporaryPolygonData[]> pTempData(new temporaryPolygonData[nCount]); sal_uInt32 a, b; for(a = 0L; a < nCount; a++) @@ -934,8 +935,6 @@ namespace basegfx { aRetval.append(mergeTemporaryPointsAndPolygon(pTempData[a].getPolygon(), pTempData[a].getTemporaryPointVector())); } - - delete[] pTempData; } return aRetval; |