diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-30 08:01:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-30 11:26:39 +0100 |
commit | 24a2c65e7ea15166061d96352164b51c5ffd9fa8 (patch) | |
tree | 935a5a46ec5ac926863d08c548920e1c93236626 /basegfx/source | |
parent | b3329c10cca25eb393430d9d9f10ebd9e3c1240b (diff) |
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.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx/source')
-rw-r--r-- | basegfx/source/polygon/b2dpolygon.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
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) { |