diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-16 11:20:21 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-16 11:20:21 +0100 |
commit | ba069ff6c82f427d910a94c3f5e3dc06306c1ecc (patch) | |
tree | d7ace6944e73ffa0b36f84100abdce626b623c17 /src | |
parent | 30d4c8e5c26aa89a64998ef1da350d4d80359237 (diff) |
c
Diffstat (limited to 'src')
-rw-r--r-- | src/wall-atlas.cpp | 4 | ||||
-rw-r--r-- | src/wall-atlas.hpp | 12 |
2 files changed, 8 insertions, 8 deletions
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; |