test: ENTT_ID_TYPE -> entt::id_type

This commit is contained in:
Michele Caini
2020-07-11 15:56:30 +02:00
parent 1f0acec06c
commit 7692c4a377
2 changed files with 3 additions and 3 deletions

View File

@@ -66,5 +66,5 @@ TEST(TypeTraits, MemberClass) {
TEST(TypeTraits, Tag) {
ASSERT_EQ(entt::tag<"foobar"_hs>::value, entt::hashed_string::value("foobar"));
ASSERT_TRUE((std::is_same_v<typename entt::tag<"foobar"_hs>::value_type, ENTT_ID_TYPE>));
ASSERT_TRUE((std::is_same_v<typename entt::tag<"foobar"_hs>::value_type, entt::id_type>));
}

View File

@@ -12,12 +12,12 @@ struct type_id;
#define ASSIGN_TYPE_ID(clazz)\
template<>\
struct type_id<clazz>\
: std::integral_constant<ENTT_ID_TYPE, entt::basic_hashed_string<std::remove_cv_t<std::remove_pointer_t<std::decay_t<decltype(#clazz)>>>>{#clazz}>\
: std::integral_constant<entt::id_type, entt::basic_hashed_string<std::remove_cv_t<std::remove_pointer_t<std::decay_t<decltype(#clazz)>>>>{#clazz}>\
{}
template<typename Type>
struct entt::type_info<Type> {
static constexpr ENTT_ID_TYPE id() ENTT_NOEXCEPT {
static constexpr entt::id_type id() ENTT_NOEXCEPT {
return type_id<Type>::value;
}
};