From eef1bfcbd65f1e7e55005642f9bcfdf363abd27d Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 1 Dec 2021 01:44:03 -0600 Subject: [PATCH] [nostalgia/core] Make AssetManager type name verification a static_assert --- src/nostalgia/core/assetmanager.hpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/nostalgia/core/assetmanager.hpp b/src/nostalgia/core/assetmanager.hpp index be15acdf..bdd7de61 100644 --- a/src/nostalgia/core/assetmanager.hpp +++ b/src/nostalgia/core/assetmanager.hpp @@ -170,13 +170,8 @@ class AssetManager { template AssetTypeManager *getTypeManager() noexcept { -#if __cplusplus >= 202002L - constexpr auto typeName = ox::getModelTypeName(); + constexpr auto typeName = ox::ModelTypeName_v; static_assert(ox_strcmp(typeName, "") != 0, "Types must have TypeName to use AssetManager"); -#else - const auto typeName = ox::getModelTypeName(); - oxAssert(ox_strcmp(typeName, "") != 0, "Types must have TypeName to use AssetManager"); -#endif auto &am = m_assetTypeManagers[typeName]; if (!am) { am = ox::make_unique>();