basegfx/source/polygon/b2dpolygon.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 24a2c65e7ea15166061d96352164b51c5ffd9fa8 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Oct 30 08:01:00 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Oct 30 11:26:39 2022 +0100 tdf#126788 use singleton to avoid initial allocation Change-Id: I55011cdd3e6c457c6ab91d90579ace3524a9889d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx index b0171ef000e2..ed5954bf0cf7 100644 --- a/basegfx/source/polygon/b2dpolygon.cxx +++ b/basegfx/source/polygon/b2dpolygon.cxx @@ -1075,7 +1075,10 @@ public: namespace basegfx { - B2DPolygon::B2DPolygon() = default; + static o3tl::cow_wrapper<ImplB2DPolygon> DEFAULT; + + B2DPolygon::B2DPolygon() + : mpPolygon(DEFAULT) {} B2DPolygon::B2DPolygon(std::initializer_list<basegfx::B2DPoint> aPoints) {