From 8fd2ce8d4734c3b4c10a76d1bf3b62970a3dde76 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 21 Jul 2022 10:56:53 +0200 Subject: [PATCH] registry: remove useless validity check from erase --- src/entt/entity/registry.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index 4bd4598c3..d0ffaf493 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -939,7 +939,6 @@ public: template void erase(It first, It last) { if constexpr(sizeof...(Other) == 0u) { - ENTT_ASSERT(([this, it = first, &last]() mutable { for(; it != last && valid(*it); ++it); return it; }() == last), "Invalid entity"); assure().erase(std::move(first), std::move(last)); } else { for(auto cpools = std::forward_as_tuple(assure(), assure()...); first != last; ++first) {