diff options
-rw-r--r-- | src/chunk-walls.cpp | 6 | ||||
-rw-r--r-- | wall-tileset-tool/main.cpp | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/chunk-walls.cpp b/src/chunk-walls.cpp index 59042a11..6918248c 100644 --- a/src/chunk-walls.cpp +++ b/src/chunk-walls.cpp @@ -308,7 +308,11 @@ GL::Mesh chunk::make_wall_mesh() ranges::sort(ranges::zip_view(vertexes.prefix(N), ArrayView<uint_fast16_t>{_walls->mesh_indexes.data(), N}), - [&A = _walls->atlases](const auto& a, const auto& b) { return A[a.second] < A[b.second]; }); + [&A = _walls->atlases](const auto& a, const auto& b) { + const auto& [av, ai] = a; + const auto& [bv, bi] = b; + return A[ai] < A[bi]; + }); auto vertex_view = std::as_const(vertexes).prefix(N); auto index_view = make_indexes(N); diff --git a/wall-tileset-tool/main.cpp b/wall-tileset-tool/main.cpp index e9dd6355..c23b3464 100644 --- a/wall-tileset-tool/main.cpp +++ b/wall-tileset-tool/main.cpp @@ -182,7 +182,7 @@ bool do_group(state st, size_t i, size_t j, Group& new_group) fm_assert(Math::max(expected_size.x(), expected_size.y()) < max_image_dimension); fm_assert((size_t)st.groups.at(j).G == j); - auto& frames = [&] -> auto&& { + auto& frames = [&]() -> auto&& { for (auto& g : st.groups) if ((size_t)g.G == j) return g.frames; |