summaryrefslogtreecommitdiff
path: root/helpcompiler
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-16 14:15:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-17 08:34:42 +0000
commit7a60e90ef05c84923f83882efc01c33fef1ed305 (patch)
tree4c49f1ab14fda2a79e0d8efdb731d4d6fe924eba /helpcompiler
parenta9367c1b39600d5a5e2d0067113f06ad59cc37a1 (diff)
new loplugin: useuniqueptr: helpcompiler..io
Change-Id: I6b394163c144e6b5540cb160abb613d56fe327de Reviewed-on: https://gerrit.libreoffice.org/33165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'helpcompiler')
-rw-r--r--helpcompiler/inc/HelpLinker.hxx3
-rw-r--r--helpcompiler/source/HelpLinker.cxx5
2 files changed, 3 insertions, 5 deletions
diff --git a/helpcompiler/inc/HelpLinker.hxx b/helpcompiler/inc/HelpLinker.hxx
index 8be1b4a49889..7fce510bb774 100644
--- a/helpcompiler/inc/HelpLinker.hxx
+++ b/helpcompiler/inc/HelpLinker.hxx
@@ -61,7 +61,6 @@ public:
{}
~HelpLinker()
{
- delete m_pIndexerPreProcessor;
}
private:
@@ -82,7 +81,7 @@ private:
std::string extensionDestination;
bool bExtensionMode;
fs::path indexDirParentName;
- IndexerPreProcessor* m_pIndexerPreProcessor;
+ std::unique_ptr<IndexerPreProcessor> m_pIndexerPreProcessor;
bool m_bUseLangRoot;
bool m_bCreateIndex;
void initIndexerPreProcessor();
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
index 3c992bed0c9b..1af6a58467a5 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -266,9 +266,8 @@ void HelpLinker::addBookmark( FILE* pFile_DBHelp, std::string thishid,
void HelpLinker::initIndexerPreProcessor()
{
- delete m_pIndexerPreProcessor;
- m_pIndexerPreProcessor = new IndexerPreProcessor( indexDirParentName,
- idxCaptionStylesheet, idxContentStylesheet );
+ m_pIndexerPreProcessor.reset( new IndexerPreProcessor( indexDirParentName,
+ idxCaptionStylesheet, idxContentStylesheet ) );
}
/**