From 28ba97727326c05c9347b50b0114f01c0ec8b1df Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 22 Nov 2023 09:47:25 +0100 Subject: a --- loader/vobj.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'loader/vobj.cpp') diff --git a/loader/vobj.cpp b/loader/vobj.cpp index 1f8f5207..aa3be207 100644 --- a/loader/vobj.cpp +++ b/loader/vobj.cpp @@ -48,7 +48,7 @@ namespace floormat::loader_detail { #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif -std::shared_ptr loader_impl::make_vobj_anim_atlas(StringView name, StringView image_filename) +std::shared_ptr loader_impl::make_vobj_anim_atlas(StringView name, StringView image_filename) { auto tex = texture(VOBJ_PATH, image_filename); anim_def def; @@ -65,7 +65,7 @@ std::shared_ptr loader_impl::make_vobj_anim_atlas(StringView .size = def.pixel_size }} }}; - auto atlas = std::make_shared(name, tex, std::move(def)); + auto atlas = std::make_shared(name, tex, std::move(def)); return atlas; } @@ -87,6 +87,8 @@ void loader_impl::get_vobj_list() const auto& x = vobjs.back(); vobj_atlas_map[x.atlas->name()] = &x; } + + fm_assert(!vobjs.empty()); } ArrayView loader_impl::vobj_list() -- cgit v1.2.3