mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
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:
+2
-1
@@ -223,7 +223,8 @@ void Set::reflect_cards<Writer> (Writer& tag) {
|
||||
// writeFile won't quite work because we'd need
|
||||
// include file: card: filename
|
||||
// to do that
|
||||
Writer writer(openOut(full_name), app_version);
|
||||
auto stream = openOut(full_name);
|
||||
Writer writer(*stream, app_version);
|
||||
writer.handle(_("card"), card);
|
||||
referenceFile(full_name);
|
||||
REFLECT_N("include_file", full_name);
|
||||
|
||||
Reference in New Issue
Block a user