summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-19 09:11:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-19 11:28:41 +0000
commit968f6a7f0293c08a73807603f3cb294e4b50bad8 (patch)
treeace3fb5c260c8bbdc3f97c48499b5466f660a68c /xmlscript
parentd3ff66999d924e832f8219c65ced0526f1a67f82 (diff)
new loplugin: useuniqueptr: unotools..xmlscript
Change-Id: I6966d44cff644112dd837adfe7d9c4f459457271 Reviewed-on: https://gerrit.libreoffice.org/33298 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/xmllib_imexp/xmllib_import.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/xmlscript/source/xmllib_imexp/xmllib_import.cxx b/xmlscript/source/xmllib_imexp/xmllib_import.cxx
index 4dfe36501aef..2bf8b167edb6 100644
--- a/xmlscript/source/xmllib_imexp/xmllib_import.cxx
+++ b/xmlscript/source/xmllib_imexp/xmllib_import.cxx
@@ -198,7 +198,7 @@ void LibrariesElement::endElement()
throw (xml::sax::SAXException, RuntimeException, std::exception)
{
sal_Int32 nLibCount = mxImport->mpLibArray->mnLibCount = (sal_Int32)mLibDescriptors.size();
- mxImport->mpLibArray->mpLibs = new LibDescriptor[ nLibCount ];
+ mxImport->mpLibArray->mpLibs.reset( new LibDescriptor[ nLibCount ] );
for( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
@@ -264,12 +264,11 @@ SAL_CALL importLibrary( LibDescriptor& rLib )
LibDescriptorArray::LibDescriptorArray( sal_Int32 nLibCount )
{
mnLibCount = nLibCount;
- mpLibs = new LibDescriptor[ mnLibCount ];
+ mpLibs.reset( new LibDescriptor[ mnLibCount ] );
}
LibDescriptorArray::~LibDescriptorArray()
{
- delete[] mpLibs;
}
}