registry: remove validity check from try_get

This commit is contained in:
Michele Caini
2022-07-20 14:47:54 +02:00
parent 80f8051c57
commit e604060369

View File

@@ -1048,8 +1048,6 @@ public:
*/
template<typename... Type>
[[nodiscard]] auto try_get([[maybe_unused]] const entity_type entt) const {
ENTT_ASSERT(valid(entt), "Invalid entity");
if constexpr(sizeof...(Type) == 1) {
const auto &cpool = assure<std::remove_const_t<Type>...>();
return cpool.contains(entt) ? std::addressof(cpool.get(entt)) : nullptr;