bugfix
This commit is contained in:
parent
9b22a5980a
commit
efb590c2cd
@ -8,16 +8,8 @@ namespace refl{
|
||||
using Impl = gen::MetaImpl<T, string_hash("Meta")>;
|
||||
{%- endif %}
|
||||
{%- if IsMultyMeta %}
|
||||
{%- for Meta in MetaList %}
|
||||
static const UClass* get_{{Meta}}();
|
||||
{%- endfor %}
|
||||
static const UClass* GetMeta(Name name) {
|
||||
{%- for Meta in MetaList %}
|
||||
if (name == string_hash("{{Meta}}")) {
|
||||
return get_{{Meta}}();
|
||||
}
|
||||
{%- endfor %}
|
||||
return nullptr;
|
||||
consteval static auto MetaList() {
|
||||
return std::array{ {% for Meta in MetaList %}string_hash("{{Meta}}"){% unless forloop.last %}, {% endunless %}{% endfor %} };
|
||||
}
|
||||
{%- endif %}
|
||||
};
|
||||
|
||||
@ -22,20 +22,4 @@ namespace gen{
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
{%- if MetaType == 1 %}
|
||||
namespace refl{
|
||||
const UClass* Meta<{{FullName}}>::get_{{ MetaName }}()
|
||||
{
|
||||
static const UClass_Meta<T, gen::MetaImpl<T, string_hash("{{ MetaName }}")>> s_cls{};
|
||||
return &s_cls;
|
||||
};
|
||||
}
|
||||
{%- elsif MetaType == 2 %}
|
||||
namespace refl{
|
||||
inline const UClass* Meta<{{FullName}}>::get_{{ MetaName }}()
|
||||
{
|
||||
return &TypeInfo<T>::StaticClass;
|
||||
};
|
||||
}
|
||||
{%- endif %}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user