summaryrefslogtreecommitdiff
path: root/i18npool/source/localedata/LocaleNode.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-23 08:49:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-23 18:35:00 +0200
commitc66568d6b0bbcce26cbdc5a4e5f6e4c0ae748e45 (patch)
tree2237871caf9e1f78875e808ef81f565ba1aaf61f /i18npool/source/localedata/LocaleNode.hxx
parent87f1f7fdb34fe452ac540524224e1e808ce5d3a2 (diff)
loplugin:useuniqueptr, look for containers..
that can use std::unique_ptr, and apply it in i18npool Change-Id: Ib410abaf73d5f392c7a7a9a322872b08c948f9e9 Reviewed-on: https://gerrit.libreoffice.org/41438 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool/source/localedata/LocaleNode.hxx')
-rw-r--r--i18npool/source/localedata/LocaleNode.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/i18npool/source/localedata/LocaleNode.hxx b/i18npool/source/localedata/LocaleNode.hxx
index c3e6c57e6a22..0f089d162bf3 100644
--- a/i18npool/source/localedata/LocaleNode.hxx
+++ b/i18npool/source/localedata/LocaleNode.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
#include <vector>
+#include <memory>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/xml/sax/SAXParseException.hpp>
@@ -85,7 +86,7 @@ class LocaleNode
OUString aValue;
Attr aAttribs;
LocaleNode * parent;
- std::vector<LocaleNode*> children;
+ std::vector<std::unique_ptr<LocaleNode>> children;
protected:
mutable int nError;
@@ -97,7 +98,7 @@ public:
const OUString& getValue() const { return aValue; };
const Attr& getAttr() const { return aAttribs; };
sal_Int32 getNumberOfChildren () const { return sal_Int32(children.size()); };
- LocaleNode * getChildAt (sal_Int32 idx) const { return children[idx] ; };
+ LocaleNode * getChildAt (sal_Int32 idx) const { return children[idx].get(); };
const LocaleNode * findNode ( const sal_Char *name) const;
void print () const;
void printR () const;