diff options
-rw-r--r-- | loader/wall-atlas.cpp | 2 | ||||
-rw-r--r-- | src/wall-atlas.cpp | 4 | ||||
-rw-r--r-- | 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<wall_atlas> 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<class wall_atlas>(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<Wall::Direction>& array, const std::array<DirArrayIndex, Direction_COUNT>& map) noexcept(false) +void resolve_wall_rotations(Array<Wall::Direction>& array, const std::array<DirArrayIndex, Direction_COUNT>& 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<const Frame> { - 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 <array> #include <bitset> -#include <vector> +#include <Corrade/Containers/Array.h> #include <Corrade/Containers/String.h> #include <Magnum/Math/Vector2.h> #include <Magnum/Math/Color.h> @@ -85,7 +85,7 @@ struct DirArrayIndex { bool operator==(const DirArrayIndex&) const noexcept; }; -void resolve_wall_rotations(std::vector<Wall::Direction>& dirs, const std::array<DirArrayIndex, Direction_COUNT>& map) noexcept(false); +void resolve_wall_rotations(Array<Wall::Direction>& dirs, const std::array<DirArrayIndex, Direction_COUNT>& 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<Wall::Frame> frames; - std::vector<Wall::Direction> direction_array; + Array<Wall::Frame> frames; + Array<Wall::Direction> direction_array; std::array<Wall::DirArrayIndex, Wall::Direction_COUNT> direction_map; std::bitset<Wall::Direction_COUNT> direction_mask{0}; @@ -118,8 +118,8 @@ class wall_atlas final using Group_ = Wall::Group_; using DirArrayIndex = Wall::DirArrayIndex; - std::vector<Direction> _dir_array; - std::vector<Frame> _frame_array; + Array<Direction> _dir_array; + Array<Frame> _frame_array; Info _info; String _path; Vector2ui _image_size; |