config/type_id: minor changes
This commit is contained in:
@@ -55,12 +55,13 @@
|
||||
#ifndef ENTT_STANDARD_CPP
|
||||
# if defined _MSC_VER
|
||||
# define ENTT_PRETTY_FUNCTION __FUNCSIG__
|
||||
# define ENTT_PRETTY_FUNCTION_CONSTEXPR ENTT_PRETTY_FUNCTION
|
||||
# define ENTT_PRETTY_FUNCTION_CONSTEXPR(...) constexpr
|
||||
# elif defined __clang__ || (defined __GNUC__ && __GNUC__ > 8)
|
||||
# define ENTT_PRETTY_FUNCTION __PRETTY_FUNCTION__
|
||||
# define ENTT_PRETTY_FUNCTION_CONSTEXPR ENTT_PRETTY_FUNCTION
|
||||
# define ENTT_PRETTY_FUNCTION_CONSTEXPR(...) constexpr
|
||||
# elif defined __GNUC__
|
||||
# define ENTT_PRETTY_FUNCTION __PRETTY_FUNCTION__
|
||||
# define ENTT_PRETTY_FUNCTION_CONSTEXPR(...) __VA_ARGS__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -86,14 +86,9 @@ struct ENTT_API type_info {
|
||||
* @brief Returns the numeric representation of a given type.
|
||||
* @return The numeric representation of the given type.
|
||||
*/
|
||||
#if defined ENTT_PRETTY_FUNCTION_CONSTEXPR
|
||||
static constexpr id_type id() ENTT_NOEXCEPT {
|
||||
constexpr auto value = entt::hashed_string::value(ENTT_PRETTY_FUNCTION_CONSTEXPR);
|
||||
return value;
|
||||
}
|
||||
#elif defined ENTT_PRETTY_FUNCTION
|
||||
static id_type id() ENTT_NOEXCEPT {
|
||||
static const auto value = entt::hashed_string::value(ENTT_PRETTY_FUNCTION);
|
||||
#if defined ENTT_PRETTY_FUNCTION
|
||||
static ENTT_PRETTY_FUNCTION_CONSTEXPR() id_type id() ENTT_NOEXCEPT {
|
||||
ENTT_PRETTY_FUNCTION_CONSTEXPR(static const) auto value = entt::hashed_string::value(ENTT_PRETTY_FUNCTION);
|
||||
return value;
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user