diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/serializer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/serializer.cpp b/test/serializer.cpp index 5179342c..86105d3b 100644 --- a/test/serializer.cpp +++ b/test/serializer.cpp @@ -51,7 +51,6 @@ chunk& test_app::make_test_chunk(world& w, chunk_coords_ ch) { auto& e = *w.make_object<scenery>(w.make_id(), {ch, {K+3, K+1}}, door); - const auto index = e.index(); const auto end = e.atlas->info().nframes-1; constexpr auto dt = Second / 60; fm_assert(e.frame == end); @@ -59,10 +58,10 @@ chunk& test_app::make_test_chunk(world& w, chunk_coords_ ch) fm_assert(!x.active); e.activate(e.index()); fm_assert(x.active); - e.update(index, dt); + { auto index = e.index(); e.update(index, dt); } fm_assert(e.frame != end); for (int i = 0; i < 60*3; i++) - e.update(index, dt); + { auto index = e.index(); e.update(index, dt); } fm_assert(e.frame == 0); fm_assert(!x.active); } |
