summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-08-21 17:04:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-22 16:23:14 +0200
commit0f6457b1e867c49bc82f2b18e2e462fb7100051f (patch)
tree500430f8d8bbfd7fa1a2d49430aa8c7c443ce337 /filter
parentf30c3ff66a24d5031c077be0cb839f5f249c188e (diff)
don't store vcl::Font with unique_ptr
it is already a COW object, so just use std::optional Change-Id: I5ced54dbf3dc222316d9bcf3581b36e0f6e6e270 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120818 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/svg/svgwriter.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index 30799453c616..7f0526d62fb9 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -78,14 +78,14 @@ struct SVGState
struct PartialState
{
PushFlags meFlags;
- ::std::unique_ptr<vcl::Font> mupFont;
+ ::std::optional<vcl::Font> mupFont;
sal_Int32 mnRegionClipPathId;
const vcl::Font& getFont( const vcl::Font& rDefaultFont ) const
{ return mupFont ? *mupFont : rDefaultFont; }
void setFont( const vcl::Font& rFont )
- { mupFont.reset( new vcl::Font(rFont) ); }
+ { mupFont = rFont; }
PartialState()
: meFlags( PushFlags::NONE )