diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-21 20:14:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-22 16:24:05 +0200 |
commit | 008f28c9e01114e731f785e9e238236a1ed069d2 (patch) | |
tree | ee8ee5df51471cb87a663048835800b24fb8b341 /svgio/inc/svganode.hxx | |
parent | 0944ef734571ae34cbecc53812e576a39b3722f0 (diff) |
no need to use unique_ptr for B2DHomMatrix
it is already a COW type
Change-Id: Ide1dedfb8be7593bf45b0e78899450f04291f09e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120828
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svgio/inc/svganode.hxx')
-rw-r--r-- | svgio/inc/svganode.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/svgio/inc/svganode.hxx b/svgio/inc/svganode.hxx index ac47da7d5cc7..3fa49442b35e 100644 --- a/svgio/inc/svganode.hxx +++ b/svgio/inc/svganode.hxx @@ -33,7 +33,7 @@ namespace svgio::svgreader SvgStyleAttributes maSvgStyleAttributes; /// variable scan values, dependent of given XAttributeList - std::unique_ptr<basegfx::B2DHomMatrix> mpaTransform; + std::optional<basegfx::B2DHomMatrix> mpaTransform; public: SvgANode( @@ -46,8 +46,8 @@ namespace svgio::svgreader virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const override; /// transform content - const basegfx::B2DHomMatrix* getTransform() const { return mpaTransform.get(); } - void setTransform(const basegfx::B2DHomMatrix* pMatrix) { mpaTransform.reset(); if(pMatrix) mpaTransform.reset( new basegfx::B2DHomMatrix(*pMatrix) ); } + const std::optional<basegfx::B2DHomMatrix>& getTransform() const { return mpaTransform; } + void setTransform(const std::optional<basegfx::B2DHomMatrix>& pMatrix) { mpaTransform = pMatrix; } }; } // end of namespace svgio::svgreader |