Skip to content

Commit c63396c

Browse files
committed
dd
1 parent e171d80 commit c63396c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

editor/scenery-editor.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "scenery-editor.hpp"
22
#include "src/anim-atlas.hpp"
33
#include "loader/loader.hpp"
4-
#include "compat/assert.hpp"
54
#include "src/world.hpp"
65
#include "src/RTree-search.hpp"
76
#include "src/rotation.inl"
@@ -89,16 +88,15 @@ void scenery_editor::place_tile(world& w, global_coords pos, const scenery_& s,
8988
auto [c, t] = w[pos];
9089
start:
9190
const auto& es = c.objects();
91+
const auto sz = es.size();
9292
while (auto id = a.get_object_colliding_with_cursor())
9393
{
94-
for (auto i = es.size()-1; i != (size_t)-1; i--)
95-
{
94+
for (auto i = 0uz; i < sz; i++)
9695
if (es[i]->id == id)
9796
{
9897
c.remove_object(i);
9998
goto start;
10099
}
101-
}
102100
break;
103101
}
104102
}

0 commit comments

Comments
 (0)