summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-07 16:45:28 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-07 16:45:28 +0200
commit15e8cebc19bfb484ba46a3589378d52ca769769e (patch)
treecd4174c7d15671434773acdc957a6bf894d6b29d /test
parent7b7e0ba851189848ff1c89761a1609e6a978fb19 (diff)
a
Diffstat (limited to 'test')
-rw-r--r--test/json.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/json.cpp b/test/json.cpp
index cec6724e..1db03d03 100644
--- a/test/json.cpp
+++ b/test/json.cpp
@@ -18,10 +18,10 @@ static chunk make_test_chunk()
metal3 = loader.tile_atlas("share/game/images/metal3.tga", {2, 2});
constexpr auto N = TILE_MAX_DIM;
chunk c;
- c.foreach_tile([&](tile& x, std::size_t k, local_coords pt) {
+ for (auto [x, k, pt] : c) {
const auto& atlas = pt.x > N/2 && pt.y >= N/2 ? metal1 : metal2;
x.ground_image = { atlas, (std::uint8_t)(k % atlas->num_tiles().product()) };
- });
+ }
constexpr auto K = N/2;
c[{K, K }].wall_north = { metal3, 0 };
c[{K, K }].wall_west = { metal3, 0 };