registry: non-const try_get doesn't create pools anymore
This commit is contained in:
@@ -861,8 +861,7 @@ public:
|
||||
ENTT_ASSERT(valid(entity));
|
||||
|
||||
if constexpr(sizeof...(Component) == 1) {
|
||||
auto *cpool = assure<Component...>();
|
||||
return cpool->contains(entity) ? &cpool->get(entity) : nullptr;
|
||||
return (const_cast<Component *>(std::as_const(*this).template try_get<Component>(entity)), ...);
|
||||
} else {
|
||||
return std::make_tuple(try_get<Component>(entity)...);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user