From 15e8cebc19bfb484ba46a3589378d52ca769769e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 7 Oct 2022 16:45:28 +0200 Subject: a --- main/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main') diff --git a/main/main.cpp b/main/main.cpp index 4476e1ef..a579f1eb 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -85,10 +85,10 @@ chunk app::make_test_chunk() { constexpr auto N = TILE_MAX_DIM; chunk c; - c.foreach_tile([&, this](tile& x, std::size_t k, local_coords pt) { - const auto& atlas = pt.x > N/2 && pt.y >= N/2 ? floor2 : floor1; - x.ground_image = { atlas, (std::uint8_t)(k % atlas->num_tiles().product()) }; - }); + for (auto [x, k, pt] : c) { + const auto& atlas = pt.x > N/2 && pt.y >= N/2 ? floor2 : floor1; + x.ground_image = { atlas, (std::uint8_t)(k % atlas->num_tiles().product()) }; + } constexpr auto K = N/2; c[{K, K }].wall_north = { wall1, 0 }; c[{K, K }].wall_west = { wall2, 0 }; -- cgit v1.2.3