diff options
Diffstat (limited to 'editor/editor-io.cpp')
| -rw-r--r-- | editor/editor-io.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor-io.cpp b/editor/editor-io.cpp index 1a80d2d..7b93b51 100644 --- a/editor/editor-io.cpp +++ b/editor/editor-io.cpp @@ -8,7 +8,6 @@ #include <fstream> void pke_editor_scene_save(const char *file_path) { - std::ostringstream stream{}; srlztn_serialize_helper *helper = pke_serialize_init(pkeSettings.mem.bkt); bool failed = false; @@ -27,7 +26,7 @@ void pke_editor_scene_save(const char *file_path) { if (!f.is_open()) { failed = true; } else { - f << stream.str(); + f << helper->o.str(); } f.flush(); f.close(); @@ -39,7 +38,7 @@ void pke_editor_scene_save(const char *file_path) { strncpy(errFileName + strlen(file_path), ".err", 256 - strlen(file_path)); std::ofstream errF(file_path); if (errF.is_open()) { - errF << stream.str(); + errF << helper->o.str(); errF.flush(); errF.close(); fprintf(stderr, "Failed to save scene file '%s', partial output saved to '%s'\n", file_path, errFileName); @@ -57,6 +56,7 @@ void pke_editor_scene_load(const char *file_path) { return; } srlztn_deserialize_helper *helper = pke_deserialize_init(pkeSettings.mem.bkt); + helper->i = &f; // TODO scene name is in the file? helper->scene = pke_scene_get_by_name(file_path); if (helper->scene == nullptr) { |
