summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-20 22:23:00 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-20 22:23:33 +0200
commitb2cc7ef52a230e909d25b54dd3f355823cb60a56 (patch)
tree8e1d2199b6d4451291031caa439053622c4ef2d1
parent2eb8a266fd01bb0c6b57a40b16e1dc8ea927b522 (diff)
kill ugly std::get<N>
-rw-r--r--main/editor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/editor.cpp b/main/editor.cpp
index 0fd6ca34..4ee746fe 100644
--- a/main/editor.cpp
+++ b/main/editor.cpp
@@ -27,10 +27,12 @@ void tile_type::load_atlases()
Containers::StringView name = atlas->name();
if (auto x = name.findLast('.'); x)
name = name.prefix(x.data());
- std::get<1>(_permutation).reserve((std::size_t)atlas->num_tiles().product());
+ auto& [_, vec] = _permutation;
+ vec.reserve((std::size_t)atlas->num_tiles().product());
_atlases[name] = std::move(atlas);
}
}
+
std::shared_ptr<tile_atlas> tile_type::maybe_atlas(Containers::StringView str)
{
auto it = std::find_if(_atlases.begin(), _atlases.end(), [&](const auto& tuple) -> bool {