diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-16 04:59:11 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-16 04:59:11 +0100 |
commit | c63396cca734a129f7d643d3f5c2d37545791206 (patch) | |
tree | a34617e4bba4345df451fb3a99cdba9e9d2f39af /editor | |
parent | e171d805393b6b802004d69ee95204e1f37e6a95 (diff) |
dd
Diffstat (limited to 'editor')
-rw-r--r-- | editor/scenery-editor.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/editor/scenery-editor.cpp b/editor/scenery-editor.cpp index 32ddffa1..07cdbd7c 100644 --- a/editor/scenery-editor.cpp +++ b/editor/scenery-editor.cpp @@ -1,7 +1,6 @@ #include "scenery-editor.hpp" #include "src/anim-atlas.hpp" #include "loader/loader.hpp" -#include "compat/assert.hpp" #include "src/world.hpp" #include "src/RTree-search.hpp" #include "src/rotation.inl" @@ -89,16 +88,15 @@ void scenery_editor::place_tile(world& w, global_coords pos, const scenery_& s, auto [c, t] = w[pos]; start: const auto& es = c.objects(); + const auto sz = es.size(); while (auto id = a.get_object_colliding_with_cursor()) { - for (auto i = es.size()-1; i != (size_t)-1; i--) - { + for (auto i = 0uz; i < sz; i++) if (es[i]->id == id) { c.remove_object(i); goto start; } - } break; } } |