summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/tile-editor.cpp5
-rw-r--r--editor/tile-editor.hpp5
2 files changed, 5 insertions, 5 deletions
diff --git a/editor/tile-editor.cpp b/editor/tile-editor.cpp
index 2d833443..4773f6bf 100644
--- a/editor/tile-editor.cpp
+++ b/editor/tile-editor.cpp
@@ -19,9 +19,8 @@ void tile_editor::load_atlases()
{
static const std::filesystem::path image_path{FM_IMAGE_PATH, std::filesystem::path::generic_format};
using atlas_array = std::vector<std::shared_ptr<tile_atlas>>;
- const String filename = _name + ".json";
- const auto filename_view = std::string_view{filename.cbegin(), filename.cend()};
- for (auto& atlas : json_helper::from_json<atlas_array>(image_path/filename_view))
+ const auto filename = _name + ".json";
+ for (auto& atlas : json_helper::from_json<atlas_array>(image_path/filename))
{
StringView name = atlas->name();
if (auto x = name.findLast('.'); x)
diff --git a/editor/tile-editor.hpp b/editor/tile-editor.hpp
index 5c90ff3d..df33c761 100644
--- a/editor/tile-editor.hpp
+++ b/editor/tile-editor.hpp
@@ -3,9 +3,10 @@
#include "editor-enums.hpp"
#include "src/tile-image.hpp"
#include "global-coords.hpp"
-#include <memory>
#include <vector>
+#include <string>
#include <map>
+#include <memory>
#include <Corrade/Containers/StringView.h>
namespace floormat {
@@ -24,7 +25,7 @@ private:
std::vector<decltype(tile_image_proto::variant)> variant;
};
- String _name;
+ std::string _name;
std::map<StringView, std::shared_ptr<tile_atlas>> _atlases;
tile_image_proto _selected_tile;
tuple _permutation;