From 6f3f9ef1911ce8189609ba9d6c7a5931ab1efc69 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 10 Feb 2024 12:22:42 +0100 Subject: [PATCH] add stable name to comps --- src/solanaceae/contact/components_id.inl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/solanaceae/contact/components_id.inl b/src/solanaceae/contact/components_id.inl index bee2654..e95a42f 100644 --- a/src/solanaceae/contact/components_id.inl +++ b/src/solanaceae/contact/components_id.inl @@ -1,3 +1,5 @@ +#pragma once + #include "./components.hpp" #include @@ -6,8 +8,12 @@ #define DEFINE_COMP_ID(x) \ template<> \ constexpr entt::id_type entt::type_hash::value() noexcept { \ - using namespace entt::literals; \ - return #x##_hs; \ + using namespace entt::literals; \ + return #x##_hs; \ +} \ +template<> \ +constexpr std::string_view entt::type_name::value() noexcept { \ + return #x; \ } // cross compiler stable ids