diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-31 14:46:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-01 12:15:22 +0000 |
commit | 2489000d3fd66319a8355fd4e37cfdfda47296d0 (patch) | |
tree | caad79e7b5bec3863604b20190b682c0d73d2b25 /codemaker/source/javamaker | |
parent | gpg4libre: Support building --with-system-gpgme (Linux only so far) (diff) | |
download | core-2489000d3fd66319a8355fd4e37cfdfda47296d0.tar.gz core-2489000d3fd66319a8355fd4e37cfdfda47296d0.zip |
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 'codemaker/source/javamaker')
-rw-r--r-- | codemaker/source/javamaker/javatype.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx index 1d414a1d9150..2da2e5f925f2 100644 --- a/codemaker/source/javamaker/javatype.cxx +++ b/codemaker/source/javamaker/javatype.cxx @@ -2087,9 +2087,9 @@ void addExceptionHandlers( if (node->present) { code->addException(start, end, handler, node->name.replace('.', '/')); } else { - for (codemaker::ExceptionTreeNode* p : node->children) + for (std::unique_ptr<codemaker::ExceptionTreeNode> const & p : node->children) { - addExceptionHandlers(p, start, end, handler, code); + addExceptionHandlers(p.get(), start, end, handler, code); } } } |