From ad1ce7e782e820ce2c5dd2ba3a557341f71793fd Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 28 Jul 2024 09:29:58 +0200 Subject: f --- compat/intrusive-ptr.hpp | 8 ++++---- src/anim-atlas.cpp | 8 +++++--- src/wall-atlas.hpp | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/compat/intrusive-ptr.hpp b/compat/intrusive-ptr.hpp index 8e9b3d6c..c8cf6ff3 100644 --- a/compat/intrusive-ptr.hpp +++ b/compat/intrusive-ptr.hpp @@ -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 diff --git a/src/anim-atlas.cpp b/src/anim-atlas.cpp index 43ba69b2..ee05987f 100644 --- a/src/anim-atlas.cpp +++ b/src/anim-atlas.cpp @@ -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; template class bptr; -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); diff --git a/src/wall-atlas.hpp b/src/wall-atlas.hpp index e0203165..52a1f96a 100644 --- a/src/wall-atlas.hpp +++ b/src/wall-atlas.hpp @@ -53,7 +53,7 @@ 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 }, @@ -61,7 +61,7 @@ struct Direction }; 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 }, -- cgit v1.2.3