diff options
Diffstat (limited to 'loader')
-rw-r--r-- | loader/atlas.cpp | 2 | ||||
-rw-r--r-- | loader/loader.hpp | 2 | ||||
-rw-r--r-- | loader/texture.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/loader/atlas.cpp b/loader/atlas.cpp index be8a2d23..a87d4ec1 100644 --- a/loader/atlas.cpp +++ b/loader/atlas.cpp @@ -84,7 +84,7 @@ std::shared_ptr<anim_atlas> loader_impl::anim_atlas(StringView name, StringView fm_soft_assert(anim_info.nframes == 1 || anim_info.fps > 0); const auto size = tex.pixels().size(); const auto width = size[1], height = size[0]; - fm_soft_assert(Vector2uz{anim_info.pixel_size} == Vector2uz{width, height}); + fm_soft_assert(anim_info.pixel_size[0] == width && anim_info.pixel_size[1] == height); auto atlas = std::make_shared<struct anim_atlas>(path, tex, std::move(anim_info)); return anim_atlas_map[atlas->name()] = atlas; diff --git a/loader/loader.hpp b/loader/loader.hpp index 577f45c5..e81abadf 100644 --- a/loader/loader.hpp +++ b/loader/loader.hpp @@ -7,7 +7,7 @@ namespace Magnum { using Vector2ub = Math::Vector2<unsigned char>; } namespace floormat { struct serialized_scenery; } namespace Magnum::Trade { -template<std::uint32_t> class ImageData; +template<uint32_t> class ImageData; using ImageData2D = ImageData<2>; } // namespace Magnum::Trade diff --git a/loader/texture.cpp b/loader/texture.cpp index e14d0f34..5edef9ee 100644 --- a/loader/texture.cpp +++ b/loader/texture.cpp @@ -15,7 +15,7 @@ Trade::ImageData2D loader_impl::texture(StringView prefix, StringView filename_) { ensure_plugins(); - constexpr std::size_t max_extension_length = 16; + constexpr size_t max_extension_length = 16; const auto N = prefix.size(); if (N > 0) fm_assert(prefix[N-1] == '/'); @@ -27,7 +27,7 @@ Trade::ImageData2D loader_impl::texture(StringView prefix, StringView filename_) if (N > 0) std::memcpy(filename, prefix.data(), N); std::memcpy(filename + N, filename_.data(), filename_.size()); - std::size_t len = filename_.size() + N; + size_t len = filename_.size() + N; for (const auto& extension : std::initializer_list<StringView>{ ".tga", ".png", ".webp", }) { |