summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-14 19:55:20 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-14 19:55:20 +0100
commitc775f4a2b2ade7767d0028ec69f847006805c6b7 (patch)
tree6b33ebe124caa859492af594425684ab9460616b
parent07018b1d1247f4fb558a2b551dd8d4ca35346377 (diff)
now switch to using stringview in the editors
-rw-r--r--editor/ground-editor.cpp2
-rw-r--r--editor/ground-editor.hpp2
-rw-r--r--editor/scenery-editor.hpp2
-rw-r--r--editor/wall-editor.cpp2
-rw-r--r--editor/wall-editor.hpp2
5 files changed, 3 insertions, 7 deletions
diff --git a/editor/ground-editor.cpp b/editor/ground-editor.cpp
index b1239b02..a1abf15c 100644
--- a/editor/ground-editor.cpp
+++ b/editor/ground-editor.cpp
@@ -33,8 +33,6 @@ void ground_editor::load_atlases()
{
if (g.name != loader.INVALID) [[likely]]
(void)loader.ground_atlas(g.name);
- else
- loader.invalid_ground_atlas();
fm_assert(g.atlas);
_atlases[g.name] = g;
}
diff --git a/editor/ground-editor.hpp b/editor/ground-editor.hpp
index 748da946..7baa716f 100644
--- a/editor/ground-editor.hpp
+++ b/editor/ground-editor.hpp
@@ -17,7 +17,7 @@ class ground_editor final
enum selection_mode : unsigned char { sel_none, sel_tile, sel_perm, };
struct tuple;
- std::map<String, ground_cell> _atlases;
+ std::map<StringView, ground_cell> _atlases;
tile_image_proto _selected_tile;
safe_ptr<tuple> _permutation;
selection_mode _selection_mode = sel_none;
diff --git a/editor/scenery-editor.hpp b/editor/scenery-editor.hpp
index 4801d005..873124a8 100644
--- a/editor/scenery-editor.hpp
+++ b/editor/scenery-editor.hpp
@@ -43,7 +43,7 @@ public:
private:
void load_atlases();
- std::map<String, scenery_> _atlases;
+ std::map<StringView, scenery_> _atlases;
scenery_ _selected;
};
diff --git a/editor/wall-editor.cpp b/editor/wall-editor.cpp
index 73a5487a..58054b15 100644
--- a/editor/wall-editor.cpp
+++ b/editor/wall-editor.cpp
@@ -54,8 +54,6 @@ void wall_editor::load_atlases()
{
if (wa.name != loader.INVALID) [[likely]]
(void)loader.wall_atlas(wa.name);
- else
- loader.invalid_wall_atlas();
fm_assert(wa.atlas);
_atlases[wa.name] = wa;
}
diff --git a/editor/wall-editor.hpp b/editor/wall-editor.hpp
index 48b6ebf3..22f018d1 100644
--- a/editor/wall-editor.hpp
+++ b/editor/wall-editor.hpp
@@ -13,7 +13,7 @@ class wall_atlas;
class wall_editor
{
- std::map<String, wall_cell> _atlases;
+ std::map<StringView, wall_cell> _atlases;
std::shared_ptr<wall_atlas> _selected_atlas;
enum rotation _r = rotation::N;