From 18a446c32eb3530e5a2fb395d9f804c61df55e66 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 11 Jan 2024 01:25:10 +0100 Subject: zz --- loader/atlas.cpp | 5 +++-- 1 file 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()); -- cgit v1.2.3