diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-10 16:04:57 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-10 16:04:57 +0100 |
commit | 8dfa3d885b34f9d9cc20b47890268cedb9fb217f (patch) | |
tree | 208400aa58f825730fc6220dea76eb1780e8122f /editor | |
parent | b1d66390ca5d11e48f58bb87f49b0f9da5338ca0 (diff) |
flush it
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor.cpp | 1 | ||||
-rw-r--r-- | editor/save.cpp | 5 | ||||
-rw-r--r-- | editor/tile-editor.cpp | 5 |
3 files changed, 3 insertions, 8 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp index 1bba44d6..67d9f344 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -8,7 +8,6 @@ #include <vector> #include <algorithm> -#include <filesystem> namespace floormat { diff --git a/editor/save.cpp b/editor/save.cpp index 35cdf9e7..e3d917fa 100644 --- a/editor/save.cpp +++ b/editor/save.cpp @@ -1,8 +1,6 @@ #include "app.hpp" #include "floormat/main.hpp" #include "src/world.hpp" - -#include <filesystem> #include <Corrade/Utility/Path.h> namespace floormat { @@ -11,9 +9,6 @@ namespace floormat { #define quicksave_file save_dir "/" "quicksave.dat" #define quicksave_tmp save_dir "/" "quicksave.tmp" -namespace Path = Corrade::Utility::Path; -using std::filesystem::path; - static bool ensure_save_directory() { if (Path::make(save_dir)) diff --git a/editor/tile-editor.cpp b/editor/tile-editor.cpp index 965245a9..2a0e9abc 100644 --- a/editor/tile-editor.cpp +++ b/editor/tile-editor.cpp @@ -7,6 +7,7 @@ #include "serialize/json-helper.hpp" #include "serialize/tile-atlas.hpp" #include <Corrade/Containers/StringStl.h> +#include <Corrade/Utility/Path.h> namespace floormat { @@ -17,10 +18,10 @@ tile_editor::tile_editor(editor_mode mode, StringView name) : _name{ name}, _mod void tile_editor::load_atlases() { - static const std::filesystem::path image_path{FM_IMAGE_PATH, std::filesystem::path::generic_format}; + const StringView image_path = FM_IMAGE_PATH; using atlas_array = std::vector<std::shared_ptr<tile_atlas>>; const auto filename = _name + ".json"; - for (auto& atlas : json_helper::from_json<atlas_array>(image_path/filename)) + for (auto& atlas : json_helper::from_json<atlas_array>(Path::join(image_path, filename))) { StringView name = atlas->name(); if (auto x = name.findLast('.'); x) |