summaryrefslogtreecommitdiffstats
path: root/helpcompiler/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-12 08:22:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-15 07:27:12 +0100
commita2f86708a5740ce9fd2a3a6ab69685d8fb53dd6c (patch)
tree3943a9e6e1e38c21be50be787f3c2c7c42c7c376 /helpcompiler/source
parentloplugin:useuniqueptr in comphelper,cppu,registry (diff)
downloadcore-a2f86708a5740ce9fd2a3a6ab69685d8fb53dd6c.tar.gz
core-a2f86708a5740ce9fd2a3a6ab69685d8fb53dd6c.zip
loplugin:useuniqueptr in BasicCodeTagger
Change-Id: I85b7d5b3030d4b3ec5318e4ee6793927c1f16355 Reviewed-on: https://gerrit.libreoffice.org/47835 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'helpcompiler/source')
-rw-r--r--helpcompiler/source/BasCodeTagger.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/helpcompiler/source/BasCodeTagger.cxx b/helpcompiler/source/BasCodeTagger.cxx
index 215ea49996f6..f59c1d268e0d 100644
--- a/helpcompiler/source/BasCodeTagger.cxx
+++ b/helpcompiler/source/BasCodeTagger.cxx
@@ -62,8 +62,6 @@ BasicCodeTagger::BasicCodeTagger( xmlDocPtr rootDoc ):
BasicCodeTagger::~BasicCodeTagger()
{
- if ( m_pXmlTreeWalker != nullptr )
- delete m_pXmlTreeWalker;
}
//!Gathers all the <bascode> tag nodes from xml tree.
/*!
@@ -75,9 +73,7 @@ void BasicCodeTagger::getBasicCodeContainerNodes()
m_BasicCodeContainerTags.clear();
- if ( m_pXmlTreeWalker != nullptr )
- delete m_pXmlTreeWalker;
- m_pXmlTreeWalker = new LibXmlTreeWalker( m_pDocument );
+ m_pXmlTreeWalker.reset(new LibXmlTreeWalker( m_pDocument ));
currentNode = m_pXmlTreeWalker->currentNode();
if ( !( xmlStrcmp( currentNode->name, reinterpret_cast<const xmlChar*>("bascode") ) ) )