diff --git a/deps/ox/src/ox/model/typestore.hpp b/deps/ox/src/ox/model/typestore.hpp index 488e6b9eb..bba084bd1 100644 --- a/deps/ox/src/ox/model/typestore.hpp +++ b/deps/ox/src/ox/model/typestore.hpp @@ -49,19 +49,9 @@ class TypeStore { constexpr DescriptorType *getInit(const auto &typeName, int typeVersion) noexcept { const auto typeId = buildTypeId(typeName, typeVersion); - auto [out, err] = m_cache.at(typeId); - if (err) { - out = &m_cache[typeId]; - *out = ox::make_unique(typeName, typeVersion); - return out->get(); - } - return out->get(); - } - - template - constexpr DescriptorType *getInit() noexcept { - constexpr auto name = requireModelTypeName(); - return getInit(name); + auto &out = m_cache[typeId]; + out = ox::make_unique(typeName, typeVersion); + return out.get(); } constexpr Result getLoad(const auto &typeName, auto typeVersion) noexcept {