summaryrefslogtreecommitdiffhomepage
path: root/entity/entity.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-18 11:18:14 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-18 11:18:14 +0100
commit7bd1ca56bd9bc561d987fce90e0ba52eeb6636d9 (patch)
tree7101b93da1cf5ce7bfac2bbdce38ac613ce78ef2 /entity/entity.hpp
parentb65b34a976b586f4e407f7a89567163c85b94aa6 (diff)
entity: split enum specialization into own header
Diffstat (limited to 'entity/entity.hpp')
-rw-r--r--entity/entity.hpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/entity/entity.hpp b/entity/entity.hpp
index 8f0980ae..4754204c 100644
--- a/entity/entity.hpp
+++ b/entity/entity.hpp
@@ -231,32 +231,6 @@ constexpr bool find_in_tuple(F&& fun, Tuple&& tuple)
return false;
}
-enum class erased_field_type : std::uint32_t {
- none,
- string,
- u8, u16, u32, u64, s8, s16, s32, s64,
- user_type_start,
- MAX = (1u << 31) - 1u,
- DYNAMIC = (std::uint32_t)-1,
-};
-
-template<erased_field_type> struct type_of_erased_field;
-template<typename T> struct erased_field_type_v_ : std::integral_constant<erased_field_type, erased_field_type::DYNAMIC> {};
-
-#define FM_ERASED_FIELD_TYPE(TYPE, ENUM) \
- template<> struct erased_field_type_v_<TYPE> : std::integral_constant<erased_field_type, erased_field_type::ENUM> {}; \
- template<> struct type_of_erased_field<erased_field_type::ENUM> { using type = TYPE; }
-FM_ERASED_FIELD_TYPE(std::uint8_t, u8);
-FM_ERASED_FIELD_TYPE(std::uint16_t, u16);
-FM_ERASED_FIELD_TYPE(std::uint32_t, u32);
-FM_ERASED_FIELD_TYPE(std::uint64_t, u64);
-FM_ERASED_FIELD_TYPE(std::int8_t, s8);
-FM_ERASED_FIELD_TYPE(std::int16_t, s16);
-FM_ERASED_FIELD_TYPE(std::int32_t, s32);
-FM_ERASED_FIELD_TYPE(std::int64_t, s64);
-FM_ERASED_FIELD_TYPE(StringView, string);
-#undef FM_ERASED_FIELD_TYPE
-
} // namespace floormat::entities
namespace floormat {