summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helpcompiler/inc/HelpCompiler.hxx14
-rw-r--r--helpcompiler/source/HelpCompiler.cxx6
-rw-r--r--helpcompiler/source/HelpLinker.cxx6
3 files changed, 13 insertions, 13 deletions
diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx
index 952e58acc987..e063bd61f1a7 100644
--- a/helpcompiler/inc/HelpCompiler.hxx
+++ b/helpcompiler/inc/HelpCompiler.hxx
@@ -165,19 +165,19 @@ public:
std::string document_module;
std::string document_title;
- HashSet *appl_hidlist;
- Hashtable *appl_keywords;
- Stringtable *appl_helptexts;
+ std::unique_ptr<HashSet> appl_hidlist;
+ std::unique_ptr<Hashtable> appl_keywords;
+ std::unique_ptr<Stringtable> appl_helptexts;
xmlDocPtr appl_doc;
StreamTable() :
- appl_hidlist(nullptr), appl_keywords(nullptr), appl_helptexts(nullptr), appl_doc(nullptr)
+ appl_doc(nullptr)
{}
void dropappl()
{
- delete appl_hidlist;
- delete appl_keywords;
- delete appl_helptexts;
+ appl_hidlist.reset();
+ appl_keywords.reset();
+ appl_helptexts.reset();
if (appl_doc) xmlFreeDoc(appl_doc);
}
~StreamTable()
diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx
index cc8c319e58a5..2c56ecafc628 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -476,9 +476,9 @@ bool HelpCompiler::compile()
streamTable.dropappl();
streamTable.appl_doc = docResolvedDoc;
- streamTable.appl_hidlist = aparser.hidlist.release();
- streamTable.appl_helptexts = aparser.helptexts.release();
- streamTable.appl_keywords = aparser.keywords.release();
+ streamTable.appl_hidlist = std::move(aparser.hidlist);
+ streamTable.appl_helptexts = std::move(aparser.helptexts);
+ streamTable.appl_keywords = std::move(aparser.keywords);
streamTable.document_id = documentId;
streamTable.document_path = fileName;
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
index 315ce57035ca..b146349200b7 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -383,7 +383,7 @@ void HelpLinker::link()
// add once this as its own id.
addBookmark( pFileDbBase_DBHelp, documentPath, fileB, std::string(), jarfileB, titleB);
- const HashSet *hidlist = streamTable.appl_hidlist;
+ const HashSet *hidlist = streamTable.appl_hidlist.get();
if (hidlist && !hidlist->empty())
{
// now iterate over all elements of the hidlist
@@ -403,7 +403,7 @@ void HelpLinker::link()
}
// now the keywords
- const Hashtable *anchorToLL = streamTable.appl_keywords;
+ const Hashtable *anchorToLL = streamTable.appl_keywords.get();
if (anchorToLL && !anchorToLL->empty())
{
std::string fakedHid = URLEncoder::encode(documentPath);
@@ -424,7 +424,7 @@ void HelpLinker::link()
}
// and last the helptexts
- const Stringtable *helpTextHash = streamTable.appl_helptexts;
+ const Stringtable *helpTextHash = streamTable.appl_helptexts.get();
if (helpTextHash && !helpTextHash->empty())
{
for (auto const& elem : *helpTextHash)