summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-07 11:21:27 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-07 11:21:27 +0100
commit94ebd2816ed1cbf08334573175d2ed1dec18f962 (patch)
tree5f653ea2b204414de138c81a321169a236e1144a /editor
parentbdbf5534c58aa5649751d0e239f13bd22f9de158 (diff)
fix use after free
Diffstat (limited to 'editor')
-rw-r--r--editor/tile-editor.cpp1
-rw-r--r--editor/tile-editor.hpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/editor/tile-editor.cpp b/editor/tile-editor.cpp
index 87d869b8..2d833443 100644
--- a/editor/tile-editor.cpp
+++ b/editor/tile-editor.cpp
@@ -6,6 +6,7 @@
#include "random.hpp"
#include "serialize/json-helper.hpp"
#include "serialize/tile-atlas.hpp"
+#include <Corrade/Containers/StringStlHash.h>
namespace floormat {
diff --git a/editor/tile-editor.hpp b/editor/tile-editor.hpp
index 9593139c..5c90ff3d 100644
--- a/editor/tile-editor.hpp
+++ b/editor/tile-editor.hpp
@@ -6,7 +6,7 @@
#include <memory>
#include <vector>
#include <map>
-#include <Corrade/Containers/String.h>
+#include <Corrade/Containers/StringView.h>
namespace floormat {
@@ -25,7 +25,7 @@ private:
};
String _name;
- std::map<std::string, std::shared_ptr<tile_atlas>> _atlases;
+ std::map<StringView, std::shared_ptr<tile_atlas>> _atlases;
tile_image_proto _selected_tile;
tuple _permutation;
selection_mode _selection_mode = sel_none;