[nostalgia/core] Make AssetManager type name verification a static_assert
This commit is contained in:
parent
596c0718e1
commit
eef1bfcbd6
@ -170,13 +170,8 @@ class AssetManager {
|
||||
|
||||
template<typename T>
|
||||
AssetTypeManager<T> *getTypeManager() noexcept {
|
||||
#if __cplusplus >= 202002L
|
||||
constexpr auto typeName = ox::getModelTypeName<T>();
|
||||
constexpr auto typeName = ox::ModelTypeName_v<T>;
|
||||
static_assert(ox_strcmp(typeName, "") != 0, "Types must have TypeName to use AssetManager");
|
||||
#else
|
||||
const auto typeName = ox::getModelTypeName<T>();
|
||||
oxAssert(ox_strcmp(typeName, "") != 0, "Types must have TypeName to use AssetManager");
|
||||
#endif
|
||||
auto &am = m_assetTypeManagers[typeName];
|
||||
if (!am) {
|
||||
am = ox::make_unique<AssetTypeManager<T>>();
|
||||
|
Loading…
Reference in New Issue
Block a user