diff options
-rw-r--r-- | basegfx/source/polygon/b2dpolygon.cxx | 8 |
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; } }; |