diff --git a/include/flecs/addons/cpp/component.hpp b/include/flecs/addons/cpp/component.hpp index 2193830a6..c87330758 100644 --- a/include/flecs/addons/cpp/component.hpp +++ b/include/flecs/addons/cpp/component.hpp @@ -30,7 +30,7 @@ namespace _ { #if defined(__GNUC__) || defined(_WIN32) template -inline static const char* type_name() { +inline const char* type_name() { static const size_t len = ECS_FUNC_TYPE_LEN(const char*, type_name, ECS_FUNC_NAME); static char result[len + 1] = {}; static const size_t front_len = ECS_FUNC_NAME_FRONT(const char*, type_name); @@ -43,7 +43,7 @@ inline static const char* type_name() { // Translate a typename into a language-agnostic identifier. This allows for // registration of components/modules across language boundaries. template -inline static const char* symbol_name() { +inline const char* symbol_name() { static const size_t len = ECS_FUNC_TYPE_LEN(const char*, symbol_name, ECS_FUNC_NAME); static char result[len + 1] = {}; return ecs_cpp_get_symbol_name(result, type_name(), len); diff --git a/include/flecs/addons/cpp/utils/signature.hpp b/include/flecs/addons/cpp/utils/signature.hpp index d17f6ad90..4505034e9 100644 --- a/include/flecs/addons/cpp/utils/signature.hpp +++ b/include/flecs/addons/cpp/utils/signature.hpp @@ -11,28 +11,28 @@ namespace flecs { namespace _ { template ::value > = 0> - static constexpr flecs::inout_kind_t type_to_inout() { + constexpr flecs::inout_kind_t type_to_inout() { return flecs::In; } template ::value > = 0> - static constexpr flecs::inout_kind_t type_to_inout() { + constexpr flecs::inout_kind_t type_to_inout() { return flecs::Out; } template ::value || is_reference::value > = 0> - static constexpr flecs::inout_kind_t type_to_inout() { + constexpr flecs::inout_kind_t type_to_inout() { return flecs::InOutDefault; } template ::value > = 0> - static constexpr flecs::oper_kind_t type_to_oper() { + constexpr flecs::oper_kind_t type_to_oper() { return flecs::Optional; } template ::value > = 0> - static constexpr flecs::oper_kind_t type_to_oper() { + constexpr flecs::oper_kind_t type_to_oper() { return flecs::And; }