summaryrefslogtreecommitdiffstats
path: root/basegfx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-08 09:26:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-08 10:29:25 +0200
commit70cd6cac6c1fe2f13702d8ab539d56ebae93683b (patch)
treede72ec8757c7882d80e71b0546bb58829680978d /basegfx
parentvcl: move OutputDevice output flag functions to outdev.cxx (diff)
downloadcore-70cd6cac6c1fe2f13702d8ab539d56ebae93683b.tar.gz
core-70cd6cac6c1fe2f13702d8ab539d56ebae93683b.zip
no need to allocate this separately
Change-Id: Ib92bd39d1c5057731d670a79bf788909856247be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121799 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dpolygon.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx
index 2baa16225227..e8f6d947c7d2 100644
--- a/basegfx/source/polygon/b2dpolygon.cxx
+++ b/basegfx/source/polygon/b2dpolygon.cxx
@@ -463,7 +463,7 @@ private:
std::optional< basegfx::B2DPolygon > mpDefaultSubdivision;
// Possibility to hold the last B2DRange calculation
- std::unique_ptr< basegfx::B2DRange > mpB2DRange;
+ mutable std::optional< basegfx::B2DRange > moB2DRange;
public:
ImplBufferedData()
@@ -482,7 +482,7 @@ public:
const basegfx::B2DRange& getB2DRange(const basegfx::B2DPolygon& rSource) const
{
- if(!mpB2DRange)
+ if(!moB2DRange)
{
basegfx::B2DRange aNewRange;
const sal_uInt32 nPointCount(rSource.count());
@@ -542,10 +542,10 @@ public:
}
}
- const_cast< ImplBufferedData* >(this)->mpB2DRange.reset(new basegfx::B2DRange(aNewRange));
+ moB2DRange = aNewRange;
}
- return *mpB2DRange;
+ return *moB2DRange;
}
};