From 41f4f4b6f9ba5fa20bb41967dc8ef8020081e38e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 8 Oct 2022 01:34:44 +0200 Subject: a --- test/json.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/json.cpp') diff --git a/test/json.cpp b/test/json.cpp index 3ce3c9d0..46bdf528 100644 --- a/test/json.cpp +++ b/test/json.cpp @@ -18,7 +18,7 @@ static chunk make_test_chunk() metal3 = loader.tile_atlas("share/game/images/metal3.tga", {2, 2}); constexpr auto N = TILE_MAX_DIM; chunk c; - for (auto [x, k, pt] : c) { + 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()) }; } @@ -52,6 +52,7 @@ bool app::test_json() // NOLINT(readability-convert-member-functions-to-static) const auto chunk = make_test_chunk(); ret &= json_helper::to_json(chunk, output_dir/"zzz_chunk-1.json"); } + return ret; } -- cgit v1.2.3