desktop/source/deployment/registry/help/dp_help.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit c908f61d722624e40f3c6985243c6cb37dabafe0 Author: Noel Grandin <[email protected]> AuthorDate: Wed Dec 12 13:34:58 2018 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Dec 13 07:24:25 2018 +0100 loplugin:useuniqueptr in desktop::BackendImpl Change-Id: I3efea7e47ad18a1dd39e81929aac319fe46357f0 Reviewed-on: https://gerrit.libreoffice.org/65032 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> 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 ) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
