[ox/model] Fix ModelTypeName_v to use requireModelTypeName

This commit is contained in:
Gary Talent 2025-01-15 23:34:48 -06:00
parent 8e816a261f
commit ba9e720f9f

View File

@ -140,16 +140,16 @@ constexpr Str getModelTypeName() noexcept {
return out;
}
template<typename T>
template<typename T, typename Str = const char*>
[[nodiscard]]
consteval auto requireModelTypeName() noexcept {
constexpr auto name = getModelTypeName<T>();
constexpr auto name = getModelTypeName<T, Str>();
static_assert(ox::StringView{name}.len(), "Type lacks required TypeName");
return name;
}
template<typename T, typename Str = const char*>
constexpr auto ModelTypeName_v = getModelTypeName<T, Str>();
constexpr auto ModelTypeName_v = requireModelTypeName<T, Str>();
template<typename T, typename Str = const char*>
constexpr auto ModelTypeVersion_v = requireModelTypeVersion<T>();