summaryrefslogtreecommitdiff
path: root/basegfx/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-08-21 19:57:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-22 10:31:24 +0200
commit3a668a2398fdbe7cfe0176900b26ca6145fb0e8c (patch)
tree58c3dd991d7609ace1c0560e39748908c2b5c1ae /basegfx/source
parent523bba89cd5ad6372fb0431cecabdca02ea2b9e3 (diff)
no need to use unique_ptr for B2DPolygon
it is already a COW type Change-Id: I86c4be9dd83b98eedf169c3b6668a7994204bca0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120827 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx/source')
-rw-r--r--basegfx/source/polygon/b2dpolygon.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx
index 9c8604e6ad32..141982aef10b 100644
--- a/basegfx/source/polygon/b2dpolygon.cxx
+++ b/basegfx/source/polygon/b2dpolygon.cxx
@@ -461,7 +461,7 @@ class ImplBufferedData : public basegfx::SystemDependentDataHolder
{
private:
// Possibility to hold the last subdivision
- std::unique_ptr< basegfx::B2DPolygon > mpDefaultSubdivision;
+ std::optional< basegfx::B2DPolygon > mpDefaultSubdivision;
// Possibility to hold the last B2DRange calculation
std::unique_ptr< basegfx::B2DRange > mpB2DRange;
@@ -478,7 +478,7 @@ public:
{
if(!mpDefaultSubdivision)
{
- const_cast< ImplBufferedData* >(this)->mpDefaultSubdivision.reset(new basegfx::B2DPolygon(basegfx::utils::adaptiveSubdivideByAngle(rSource)));
+ const_cast< ImplBufferedData* >(this)->mpDefaultSubdivision = basegfx::utils::adaptiveSubdivideByAngle(rSource);
}
return *mpDefaultSubdivision;