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:
@@ -378,7 +378,7 @@ SCRIPT_FUNCTION(copy_file) {
|
||||
String out_path = get_export_full_path(out_name);
|
||||
// copy
|
||||
ExportInfo& ei = *export_info();
|
||||
InputStreamP in = ei.export_template->openIn(input);
|
||||
auto in = ei.export_template->openIn(input);
|
||||
wxFileOutputStream out(out_path);
|
||||
if (!out.Ok()) throw Error(_("Unable to open file '") + out_path + _("' for output"));
|
||||
out.Write(*in);
|
||||
|
||||
Reference in New Issue
Block a user