From d7d9edb27e0e512fac6b5618bfd369cafc6edc1e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 11 Jan 2018 16:01:44 +0200 Subject: loplugin:useuniqueptr in PolyPolygon Also - convert to o3tl::cow_wrapper - drop the second param to the constructor and just let vector use it's own resize logic - bump MAX_POLYGONS from 0x3FF0 to 0xffff so that the ios2met filter can load it's files properly. Change-Id: I9db19e4f7b4f946e801ea07c31d2d0ded7837a0e Reviewed-on: https://gerrit.libreoffice.org/47789 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- include/tools/poly.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index a1351aa299a2..1a0926ecfff3 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -60,7 +60,7 @@ enum class PolyFlags : sal_uInt8 class SvStream; class ImplPolygon; -class ImplPolyPolygon; +struct ImplPolyPolygon; namespace tools { class PolyPolygon; } namespace basegfx @@ -189,7 +189,7 @@ public: class SAL_WARN_UNUSED TOOLS_DLLPUBLIC PolyPolygon { private: - ImplPolyPolygon* mpImplPolyPolygon; + o3tl::cow_wrapper mpImplPolyPolygon; enum class PolyClipOp { INTERSECT, @@ -198,7 +198,7 @@ private: TOOLS_DLLPRIVATE void ImplDoOperation( const tools::PolyPolygon& rPolyPoly, tools::PolyPolygon& rResult, PolyClipOp nOperation ) const; public: - PolyPolygon( sal_uInt16 nInitSize = 16, sal_uInt16 nResize = 16 ); + PolyPolygon( sal_uInt16 nInitSize = 16 ); PolyPolygon( const tools::Polygon& rPoly ); PolyPolygon( const tools::PolyPolygon& rPolyPoly ); ~PolyPolygon(); -- cgit