diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-05 00:13:40 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-05 01:04:43 +0100 |
commit | 3c7cfbc50ce21589b192e1e6d121b2e6df60a7f3 (patch) | |
tree | 6fa09e2c064913756ac608df14d5f37630cea0aa | |
parent | b8627a7d786d53e42dbad87a9eef87589dff0d16 (diff) |
ccc2
-rw-r--r-- | loader/atlas.cpp | 2 | ||||
-rw-r--r-- | loader/impl.cpp | 1 | ||||
-rw-r--r-- | loader/impl.hpp | 4 | ||||
-rw-r--r-- | loader/loader.hpp | 4 | ||||
-rw-r--r-- | loader/vobj.cpp | 2 |
5 files changed, 6 insertions, 7 deletions
diff --git a/loader/atlas.cpp b/loader/atlas.cpp index 0f492119..2afd4d2e 100644 --- a/loader/atlas.cpp +++ b/loader/atlas.cpp @@ -69,7 +69,7 @@ std::shared_ptr<struct tile_atlas> loader_impl::tile_atlas(StringView filename) return it->second; } -ArrayView<String> loader_impl::anim_atlas_list() +ArrayView<const String> loader_impl::anim_atlas_list() { if (anim_atlases.empty()) get_anim_atlas_list(); diff --git a/loader/impl.cpp b/loader/impl.cpp index 34da792a..02493089 100644 --- a/loader/impl.cpp +++ b/loader/impl.cpp @@ -2,7 +2,6 @@ #include "compat/assert.hpp" #include "loader/scenery.hpp" #include "loader/vobj-info.hpp" -#include <cstring> #include <Corrade/Containers/Pair.h> #include <Magnum/Trade/ImageData.h> diff --git a/loader/impl.hpp b/loader/impl.hpp index 13087ff3..f5975d0e 100644 --- a/loader/impl.hpp +++ b/loader/impl.hpp @@ -36,7 +36,7 @@ struct loader_impl final : loader_ Trade::ImageData2D texture(StringView prefix, StringView filename) noexcept(false) override; std::shared_ptr<struct tile_atlas> tile_atlas(StringView filename, Vector2ub size, Optional<pass_mode> pass) noexcept(false) override; std::shared_ptr<struct tile_atlas> tile_atlas(StringView filename) noexcept(false) override; - ArrayView<String> anim_atlas_list() override; + ArrayView<const String> anim_atlas_list() override; std::shared_ptr<struct anim_atlas> anim_atlas(StringView name, StringView dir) noexcept(false) override; const std::vector<serialized_scenery>& sceneries() override; const scenery_proto& scenery(StringView name) noexcept(false) override; @@ -48,7 +48,7 @@ struct loader_impl final : loader_ void get_vobj_list(); std::shared_ptr<struct anim_atlas> make_vobj_anim_atlas(StringView name, StringView image_filename); const struct vobj_info& vobj(StringView name) override; - ArrayView<struct vobj_info> vobj_list() override; + ArrayView<const struct vobj_info> vobj_list() override; void set_application_working_directory(); StringView startup_directory() noexcept override; diff --git a/loader/loader.hpp b/loader/loader.hpp index ce331203..01622820 100644 --- a/loader/loader.hpp +++ b/loader/loader.hpp @@ -28,7 +28,7 @@ struct loader_ virtual Trade::ImageData2D texture(StringView prefix, StringView filename) noexcept(false) = 0; virtual std::shared_ptr<struct tile_atlas> tile_atlas(StringView filename, Vector2ub size, Optional<pass_mode> pass) noexcept(false) = 0; virtual std::shared_ptr<struct tile_atlas> tile_atlas(StringView filename) noexcept(false) = 0; - virtual ArrayView<String> anim_atlas_list() = 0; + virtual ArrayView<const String> anim_atlas_list() = 0; virtual std::shared_ptr<struct anim_atlas> anim_atlas(StringView name, StringView dir = ANIM_PATH) noexcept(false) = 0; static void destroy(); static loader_& default_loader() noexcept; @@ -38,7 +38,7 @@ struct loader_ virtual StringView startup_directory() noexcept = 0; static StringView strip_prefix(StringView name); virtual const vobj_info& vobj(StringView name) = 0; - virtual ArrayView<struct vobj_info> vobj_list() = 0; + virtual ArrayView<const struct vobj_info> vobj_list() = 0; static StringView make_atlas_path(char(&buf)[FILENAME_MAX], StringView dir, StringView name); [[nodiscard]] static bool check_atlas_name(StringView name) noexcept; diff --git a/loader/vobj.cpp b/loader/vobj.cpp index fa9c3d73..1f8f5207 100644 --- a/loader/vobj.cpp +++ b/loader/vobj.cpp @@ -89,7 +89,7 @@ void loader_impl::get_vobj_list() } } -ArrayView<vobj_info> loader_impl::vobj_list() +ArrayView<const vobj_info> loader_impl::vobj_list() { if (vobjs.empty()) get_vobj_list(); |