Clean up pointer use:

* Use unique_ptr for Actions instead of manual memory management
 * Use unique_ptr in KeywordDatabase
 * Use unique_ptr instead of shared_ptr for file formats
 * Don't pass shared_ptr to Reader/Writer, use references instead
Also
 * Switch to C++17 so we can use map::try_emplace
This commit is contained in:
Twan van Laarhoven
2020-04-25 21:30:05 +02:00
parent 708b4389a0
commit 64ea1d7322
57 changed files with 363 additions and 385 deletions
+1 -1
View File
@@ -190,7 +190,7 @@ void ChoiceStyle::initImage() {
// CALL 0
// PUSH_CONST nil
// OR_ELSE
ScriptCustomCollectionP lookup(new ScriptCustomCollection());
ScriptCustomCollectionP lookup = make_intrusive<ScriptCustomCollection>();
FOR_EACH(ci, choice_images) {
lookup->key_value[uncanonical_name_form(ci.first)] =
lookup->key_value[ci.first] = ci.second.getValidScriptP();