summaryrefslogtreecommitdiff
path: root/registry/source/reflwrit.cxx
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 /registry/source/reflwrit.cxx
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 'registry/source/reflwrit.cxx')
-rw-r--r--registry/source/reflwrit.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx
index e0b52b08c17c..ced57265ddd9 100644
--- a/registry/source/reflwrit.cxx
+++ b/registry/source/reflwrit.cxx
@@ -877,7 +877,7 @@ void TypeWriter::createBlop()
if (m_methodCount)
{
- sal_uInt16* pMethodEntrySize = new sal_uInt16[m_methodCount];
+ std::unique_ptr<sal_uInt16[]> pMethodEntrySize( new sal_uInt16[m_methodCount] );
sal_uInt16 cpIndexName = 0;
sal_uInt16 cpIndexReturn = 0;
sal_uInt16 cpIndexDoku2 = 0;
@@ -985,8 +985,6 @@ void TypeWriter::createBlop()
cpIndexName = 0;
}
}
-
- delete[] pMethodEntrySize;
}
// reference blop