From ba069ff6c82f427d910a94c3f5e3dc06306c1ecc Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 16 Jan 2024 11:20:21 +0100 Subject: c --- loader/wall-atlas.cpp | 2 +- src/wall-atlas.cpp | 4 ++-- src/wall-atlas.hpp | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/loader/wall-atlas.cpp b/loader/wall-atlas.cpp index 16531aa4..32bc9b7d 100644 --- a/loader/wall-atlas.cpp +++ b/loader/wall-atlas.cpp @@ -43,7 +43,7 @@ std::shared_ptr loader_impl::get_wall_atlas(StringView name, StringV auto tex = texture(""_s, filename); fm_soft_assert(name == def.header.name); - fm_soft_assert(!def.frames.empty()); + fm_soft_assert(!def.frames.isEmpty()); auto atlas = std::make_shared(std::move(def), dir, tex); return atlas; } diff --git a/src/wall-atlas.cpp b/src/wall-atlas.cpp index 11bf5f15..49c7d342 100644 --- a/src/wall-atlas.cpp +++ b/src/wall-atlas.cpp @@ -26,7 +26,7 @@ StringView direction_index_to_name(size_t i) noexcept(false) return wall_atlas::directions[i].name; } -void resolve_wall_rotations(std::vector& array, const std::array& map) noexcept(false) +void resolve_wall_rotations(Array& array, const std::array& map) noexcept(false) { for (auto [dir_name, dir] : wall_atlas::directions) { @@ -165,7 +165,7 @@ auto wall_atlas::get_Direction(Direction_ num) const -> Direction* auto wall_atlas::frames(const Group& group) const -> ArrayView { - if (_frame_array.empty()) [[unlikely]] + if (_frame_array.isEmpty()) [[unlikely]] return {}; const auto size = _frame_array.size(); (void)size; const auto index = group.index, count = group.count; diff --git a/src/wall-atlas.hpp b/src/wall-atlas.hpp index 82301187..14e2ce55 100644 --- a/src/wall-atlas.hpp +++ b/src/wall-atlas.hpp @@ -5,7 +5,7 @@ #include "wall-defs.hpp" #include #include -#include +#include #include #include #include @@ -85,7 +85,7 @@ struct DirArrayIndex { bool operator==(const DirArrayIndex&) const noexcept; }; -void resolve_wall_rotations(std::vector& dirs, const std::array& map) noexcept(false); +void resolve_wall_rotations(Array& dirs, const std::array& map) noexcept(false); } // namespace floormat::Wall @@ -96,8 +96,8 @@ struct wall_atlas_def final bool operator==(const wall_atlas_def&) const noexcept; Wall::Info header; - std::vector frames; - std::vector direction_array; + Array frames; + Array direction_array; std::array direction_map; std::bitset direction_mask{0}; @@ -118,8 +118,8 @@ class wall_atlas final using Group_ = Wall::Group_; using DirArrayIndex = Wall::DirArrayIndex; - std::vector _dir_array; - std::vector _frame_array; + Array _dir_array; + Array _frame_array; Info _info; String _path; Vector2ui _image_size; -- cgit v1.2.3