add stable name to comps
This commit is contained in:
parent
9ca6adee4f
commit
6f3f9ef191
@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "./components.hpp"
|
||||
|
||||
#include <entt/core/type_info.hpp>
|
||||
@ -6,8 +8,12 @@
|
||||
#define DEFINE_COMP_ID(x) \
|
||||
template<> \
|
||||
constexpr entt::id_type entt::type_hash<x>::value() noexcept { \
|
||||
using namespace entt::literals; \
|
||||
return #x##_hs; \
|
||||
using namespace entt::literals; \
|
||||
return #x##_hs; \
|
||||
} \
|
||||
template<> \
|
||||
constexpr std::string_view entt::type_name<x>::value() noexcept { \
|
||||
return #x; \
|
||||
}
|
||||
|
||||
// cross compiler stable ids
|
||||
|
Loading…
Reference in New Issue
Block a user