summaryrefslogtreecommitdiff
path: root/svgio/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-25 13:23:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-26 08:58:42 +0200
commit6cc5c6dea2b03a14e051728aa513fb206929ea86 (patch)
tree1f7f38dbc0ffdf59addbbac239f16bd125bfad36 /svgio/inc
parent0699a18c622149ac6dbc898bf920c47c45ccd5b9 (diff)
loplugin:useuniqueptr in SvgDocument
Change-Id: I299e97c276b60be86491bfeee22d46774739ca44 Reviewed-on: https://gerrit.libreoffice.org/60969 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svgio/inc')
-rw-r--r--svgio/inc/svgdocument.hxx6
-rw-r--r--svgio/inc/svgnode.hxx2
2 files changed, 5 insertions, 3 deletions
diff --git a/svgio/inc/svgdocument.hxx b/svgio/inc/svgdocument.hxx
index de7fbc304c88..e414b19390db 100644
--- a/svgio/inc/svgdocument.hxx
+++ b/svgio/inc/svgdocument.hxx
@@ -21,12 +21,16 @@
#define INCLUDED_SVGIO_INC_SVGDOCUMENT_HXX
#include "svgnode.hxx"
+#include <memory>
#include <unordered_map>
+#include <vector>
namespace svgio
{
namespace svgreader
{
+ typedef std::vector< std::unique_ptr<SvgNode> > SvgNodeVector;
+
class SvgDocument
{
private:
@@ -52,7 +56,7 @@ namespace svgio
SvgDocument& operator=(const SvgDocument&) = delete;
/// append another root node, ownership changes
- void appendNode(SvgNode* pNode);
+ void appendNode(std::unique_ptr<SvgNode> pNode);
/// add/remove nodes with Id to mapper
void addSvgNodeToMapper(const OUString& rStr, const SvgNode& rNode);
diff --git a/svgio/inc/svgnode.hxx b/svgio/inc/svgnode.hxx
index 2db5d490fa14..1f08f5fa5acf 100644
--- a/svgio/inc/svgnode.hxx
+++ b/svgio/inc/svgnode.hxx
@@ -45,8 +45,6 @@ namespace svgio
{
namespace svgreader
{
- typedef ::std::vector< SvgNode* > SvgNodeVector;
-
enum XmlSpace
{
XmlSpace_notset,