summaryrefslogtreecommitdiff
path: root/include/codemaker
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-31 14:46:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-01 12:15:22 +0000
commit2489000d3fd66319a8355fd4e37cfdfda47296d0 (patch)
treecaad79e7b5bec3863604b20190b682c0d73d2b25 /include/codemaker
parent595848c85acc2609fcc48a40c7a9f216a2722cd8 (diff)
loplugin:useuniqueptr extend to check local vars
just the simple and obvious case for now, of a local var being allocated and deleted inside a single local block, and the delete happening at the end of the block Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/codemaker')
-rw-r--r--include/codemaker/exceptiontree.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/codemaker/exceptiontree.hxx b/include/codemaker/exceptiontree.hxx
index 8058cc8dcb29..7118006ef71b 100644
--- a/include/codemaker/exceptiontree.hxx
+++ b/include/codemaker/exceptiontree.hxx
@@ -24,6 +24,7 @@
#include <rtl/ref.hxx>
#include <rtl/string.hxx>
+#include <memory>
#include <vector>
class TypeManager;
@@ -34,7 +35,7 @@ namespace codemaker {
Represents a node of the hierarchy from the ExceptionTree class.
*/
struct ExceptionTreeNode {
- typedef std::vector< ExceptionTreeNode * > Children;
+ typedef std::vector< std::unique_ptr<ExceptionTreeNode> > Children;
// Internally used by ExceptionTree:
ExceptionTreeNode(rtl::OString const & theName):