entity:
* review of entt_traits design * added static constexpr member function entt_traits::to_integral * added static constexpr member function entt_traits::to_entity * added static constexpr member function entt_traits::to_version * added static constexpr member function entt_traits::to_type * custom class identifiers must expose member type entity_field * it's no longer required to specialize entt_traits (breaking change)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include <entt/entity/registry.hpp>
|
||||
|
||||
struct entity_id {
|
||||
using entity_type = typename entt::entt_traits<entt::entity>::entity_type;
|
||||
using entity_type = std::uint32_t;
|
||||
static constexpr auto null = entt::null;
|
||||
|
||||
constexpr entity_id(entity_type value = null)
|
||||
@@ -23,9 +23,6 @@ private:
|
||||
entity_type entt;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct entt::entt_traits<entity_id>: entt::entt_traits<entt::entity> {};
|
||||
|
||||
TEST(Example, CustomIdentifier) {
|
||||
entt::basic_registry<entity_id> registry{};
|
||||
entity_id entity{};
|
||||
|
||||
Reference in New Issue
Block a user