diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-11 01:25:10 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-11 01:25:10 +0100 |
commit | 18a446c32eb3530e5a2fb395d9f804c61df55e66 (patch) | |
tree | e7b39dadfc189a5a7810c2d7bf35629119bb9cf9 /loader/atlas.cpp | |
parent | 9e3c0ac3f71cf2148e4788793efea5968f1a46b2 (diff) |
zz
Diffstat (limited to 'loader/atlas.cpp')
-rw-r--r-- | loader/atlas.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/loader/atlas.cpp b/loader/atlas.cpp index 7d8539da..e2ecb956 100644 --- a/loader/atlas.cpp +++ b/loader/atlas.cpp @@ -131,9 +131,10 @@ void loader_impl::get_anim_atlas_list() if (const auto list = Path::list(ANIM_PATH, flags); list) { anim_atlases.reserve(list->size()); + constexpr auto suffix = ".json"_s; for (StringView str : *list) - if (str.hasSuffix(".json")) - anim_atlases.emplace_back(str.exceptSuffix(std::size(".json")-1)); + if (str.hasSuffix(suffix)) + anim_atlases.emplace_back(str.exceptSuffix(suffix.size())); } anim_atlases.shrink_to_fit(); fm_assert(!anim_atlases.empty()); |