summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-12-12 13:34:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-12-13 07:24:25 +0100
commitc908f61d722624e40f3c6985243c6cb37dabafe0 (patch)
treec50696a8318d65027263cec39bb9640c3f77d27a /desktop
parent58d3166152003f0c3fef329dce76e4aaa33fc289 (diff)
loplugin:useuniqueptr in desktop::BackendImpl
Change-Id: I3efea7e47ad18a1dd39e81929aac319fe46357f0 Reviewed-on: https://gerrit.libreoffice.org/65032 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 0ac91ff197c6..ff65aeca1be6 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -440,7 +440,7 @@ void BackendImpl::implProcessHelp(
// Call compiler
sal_Int32 nXhpFileCount = aXhpFileVector.size();
- OUString* pXhpFiles = new OUString[nXhpFileCount];
+ std::unique_ptr<OUString[]> pXhpFiles(new OUString[nXhpFileCount]);
for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp )
{
OUString aXhpFile = aXhpFileVector[iXhp];
@@ -455,10 +455,10 @@ void BackendImpl::implProcessHelp(
HelpProcessingErrorInfo aErrorInfo;
bool bSuccess = compileExtensionHelp(
aOfficeHelpPathFileURL, aHelpStr, aLangURL,
- nXhpFileCount, pXhpFiles,
+ nXhpFileCount, pXhpFiles.get(),
langFolderDestExpanded, aErrorInfo );
- delete[] pXhpFiles;
+ pXhpFiles.reset();
if( bSuccess )
{