reduce alloc costs for some basegfx objects (tdf#105575)
we can use a default object for the default constructo case, and remove one malloc for each default constructed object Change-Id: I0bec37ef9161a210973abb25669a9f16a5e0ea75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120603 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
3d45088a48
commit
889df64fbb
@@ -31,7 +31,9 @@ namespace basegfx
|
||||
{
|
||||
};
|
||||
|
||||
B2DHomMatrix::B2DHomMatrix() = default;
|
||||
static o3tl::cow_wrapper<Impl2DHomMatrix> DEFAULT;
|
||||
|
||||
B2DHomMatrix::B2DHomMatrix() : mpImpl(DEFAULT) {}
|
||||
|
||||
B2DHomMatrix::B2DHomMatrix(const B2DHomMatrix&) = default;
|
||||
|
||||
|
||||
@@ -200,7 +200,10 @@ public:
|
||||
namespace basegfx
|
||||
{
|
||||
|
||||
B2DPolyPolygon::B2DPolyPolygon() = default;
|
||||
static o3tl::cow_wrapper<ImplB2DPolyPolygon> DEFAULT;
|
||||
|
||||
B2DPolyPolygon::B2DPolyPolygon() :
|
||||
mpPolyPolygon(DEFAULT) {}
|
||||
|
||||
B2DPolyPolygon::B2DPolyPolygon(const B2DPolyPolygon&) = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user