registry: minor changes

This commit is contained in:
Michele Caini
2022-07-20 17:59:22 +02:00
parent e47e74fc76
commit 6f852c2dcb

View File

@@ -280,7 +280,7 @@ class basic_registry {
template<typename Type>
[[nodiscard]] auto &assure(const id_type id = type_hash<Type>::value()) {
static_assert(std::is_same_v<Type, std::decay_t<Type>>, "Non-decayed types not allowed");
auto &&cpool = pools[id];
auto &cpool = pools[id];
if(!cpool) {
cpool.reset(new storage_for_type<Type>{});