diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-31 14:46:38 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-11-28 00:12:51 -0500 |
commit | e540ccfb5eb43bd4a3d6920074dce8436720ba8e (patch) | |
tree | fb8b1d7a30ab8de2cf34e42f62e00112d7d62301 /include | |
parent | bf8fe9eaa36a9f8fc407ddbb2e7b561e5f9594c5 (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
Reviewed-on: https://gerrit.libreoffice.org/33749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 2489000d3fd66319a8355fd4e37cfdfda47296d0)
Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625
Diffstat (limited to 'include')
-rw-r--r-- | include/codemaker/exceptiontree.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/codemaker/exceptiontree.hxx b/include/codemaker/exceptiontree.hxx index 9c6b3b919b94..c291e66ce78b 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): |