summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/ground-editor.cpp8
-rw-r--r--editor/ground-editor.hpp6
2 files changed, 8 insertions, 6 deletions
diff --git a/editor/ground-editor.cpp b/editor/ground-editor.cpp
index a1abf15c..4c5316a0 100644
--- a/editor/ground-editor.cpp
+++ b/editor/ground-editor.cpp
@@ -1,21 +1,25 @@
#include "ground-editor.hpp"
#include "compat/assert.hpp"
+#include "compat/exception.hpp"
#include "src/ground-atlas.hpp"
#include "src/world.hpp"
#include "src/random.hpp"
#include "keys.hpp"
#include "loader/loader.hpp"
-#include "compat/exception.hpp"
+#include "loader/ground-cell.hpp"
#include <memory>
#include <Corrade/Containers/GrowableArray.h>
#include <Corrade/Utility/Path.h>
namespace floormat {
+typename std::map<StringView, ground_cell>::const_iterator ground_editor::begin() const noexcept { return _atlases.cbegin(); }
+typename std::map<StringView, ground_cell>::const_iterator ground_editor::end() const noexcept { return _atlases.cend(); }
+
struct ground_editor::tuple
{
std::shared_ptr<ground_atlas> atlas;
- Array<decltype(tile_image_proto::variant)> variant;
+ Array<variant_t> variant;
};
ground_editor::ground_editor()
diff --git a/editor/ground-editor.hpp b/editor/ground-editor.hpp
index 7baa716f..9745d14b 100644
--- a/editor/ground-editor.hpp
+++ b/editor/ground-editor.hpp
@@ -30,10 +30,8 @@ public:
~ground_editor() noexcept;
std::shared_ptr<ground_atlas> maybe_atlas(StringView str);
std::shared_ptr<ground_atlas> atlas(StringView str);
- auto cbegin() const noexcept { return _atlases.cbegin(); }
- auto cend() const noexcept { return _atlases.cend(); }
- auto begin() const noexcept { return _atlases.cbegin(); }
- auto end() const noexcept { return _atlases.cend(); }
+ typename std::map<StringView, ground_cell>::const_iterator begin() const noexcept;
+ typename std::map<StringView, ground_cell>::const_iterator end() const noexcept;
StringView name() const noexcept;
void clear_selection();