From 12eca108a07cde1606fca3e472aed58749407699 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 5 Nov 2022 19:29:40 +0100 Subject: replace std::string with Corrade's String --- editor/editor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'editor/editor.cpp') diff --git a/editor/editor.cpp b/editor/editor.cpp index 3586a3bf..499dd441 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -11,6 +11,7 @@ #include +#include #include #include @@ -25,7 +26,9 @@ void tile_editor::load_atlases() { static const std::filesystem::path image_path{IMAGE_PATH, std::filesystem::path::generic_format}; using atlas_array = std::vector>; - for (auto& atlas : json_helper::from_json(image_path/(_name + ".json"))) + const String filename = _name + ".json"; + const auto filename_view = std::string_view{filename.cbegin(), filename.cend()}; + for (auto& atlas : json_helper::from_json(image_path/filename_view)) { StringView name = atlas->name(); if (auto x = name.findLast('.'); x) -- cgit v1.2.3