From 486306d854349f0fd7f919c73b8fd8cd1f369ee9 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 10 Feb 2024 12:23:20 +0100 Subject: [PATCH] add stable id to comps --- src/solanaceae/message3/components_id.inl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/solanaceae/message3/components_id.inl b/src/solanaceae/message3/components_id.inl index 4def5d3..174f53e 100644 --- a/src/solanaceae/message3/components_id.inl +++ b/src/solanaceae/message3/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 compile(r) stable ids