From 24a2c65e7ea15166061d96352164b51c5ffd9fa8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 30 Oct 2022 08:01:00 +0200 Subject: [PATCH] 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 --- basegfx/source/polygon/b2dpolygon.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 DEFAULT; + + B2DPolygon::B2DPolygon() + : mpPolygon(DEFAULT) {} B2DPolygon::B2DPolygon(std::initializer_list aPoints) {