diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-27 14:04:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-28 08:39:35 +0200 |
commit | e32c56855b04ef825b720b20220245365eec51fd (patch) | |
tree | d497c6fad6e3e7ac39a8bc80fa8e81fc7192f199 /svgio/inc | |
parent | b2e8bbeafa35c15d168961de711e4970eb0985cb (diff) |
use boost::optional in sc and svgio
instead of using std:unique_ptr to allocate small objects on the heap
Change-Id: Ifd309a9bf331910354406b827b89a0363f3b7eda
Reviewed-on: https://gerrit.libreoffice.org/51945
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svgio/inc')
-rw-r--r-- | svgio/inc/svgnode.hxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/svgio/inc/svgnode.hxx b/svgio/inc/svgnode.hxx index 7fd8129a48b8..45d9730be909 100644 --- a/svgio/inc/svgnode.hxx +++ b/svgio/inc/svgnode.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <memory> #include <vector> +#include <boost/optional.hpp> // predefines namespace svgio @@ -94,10 +95,10 @@ namespace svgio std::vector< std::unique_ptr<SvgNode> > maChildren; /// Id svan value - std::unique_ptr<OUString> mpId; + boost::optional<OUString> mpId; /// Class svan value - std::unique_ptr<OUString> mpClass; + boost::optional<OUString> mpClass; /// XmlSpace value XmlSpace maXmlSpace; @@ -163,12 +164,12 @@ namespace svgio double getCurrentXHeight() const; /// Id access - const OUString* getId() const { return mpId.get(); } - void setId(const OUString* pfId); + boost::optional<OUString> const & getId() const { return mpId; } + void setId(OUString const &); /// Class access - const OUString* getClass() const { return mpClass.get(); } - void setClass(const OUString* pfClass); + boost::optional<OUString> const & getClass() const { return mpClass; } + void setClass(OUString const &); /// XmlSpace access XmlSpace getXmlSpace() const; |