Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
sthalik committed Jul 28, 2024
1 parent 45ecf42 commit 489cc00
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions compat/intrusive-ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ struct refcount_ops
using Tref = T*;
#endif

static constexpr inline auto incr(T* ptr) noexcept -> size_type; // todo! remove constexpr from everywhere, then move everything to .inl
static constexpr inline auto decr(Tref ptr) noexcept -> size_type;
static constexpr inline auto count(T* ptr) noexcept -> size_type;
static constexpr inline void init_to_1(T* ptr) noexcept;
static constexpr auto incr(T* ptr) noexcept -> size_type; // todo! remove constexpr from everywhere, then move everything to .inl
static constexpr auto decr(Tref ptr) noexcept -> size_type;
static constexpr auto count(T* ptr) noexcept -> size_type;
static constexpr void init_to_1(T* ptr) noexcept;
};

template<typename Tag, typename T>
Expand Down
8 changes: 5 additions & 3 deletions src/anim-atlas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@

namespace floormat {

namespace {
constexpr inline char name_array[][3] = { "n", "ne", "e", "se", "s", "sw", "w", "nw", };
constexpr inline auto rot_count = size_t(rotation_COUNT);
} // namespace

template class bptr<anim_atlas>;
template class bptr<const anim_atlas>;

static constexpr const char name_array[][3] = { "n", "ne", "e", "se", "s", "sw", "w", "nw", };
static constexpr inline auto rot_count = size_t(rotation_COUNT);

static_assert(array_size(name_array) == rot_count);
static_assert(rot_count == 8);

Expand Down
4 changes: 2 additions & 2 deletions src/wall-atlas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ struct Direction

bool operator==(const Direction&) const noexcept;

static constexpr inline member_tuple groups[] = {
static constexpr member_tuple groups[] = {
{ "wall"_s, &Direction::wall, Group_::wall },
{ "side"_s, &Direction::side, Group_::side },
{ "top"_s, &Direction::top, Group_::top },
{ "corner"_s, &Direction::corner, Group_::corner },
};
static_assert(array_size(groups) == (size_t)Group_::COUNT);

static constexpr inline member_tuple groups_for_draw[] = {
static constexpr member_tuple groups_for_draw[] = {
{ "wall"_s, &Direction::wall, Group_::wall },
{ "side"_s, &Direction::side, Group_::side },
{ "top"_s, &Direction::top, Group_::top },
Expand Down

0 comments on commit 489cc00

Please sign in to comment.