diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index 3993d6bdb..33f8e46ef 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -129,7 +129,7 @@ class basic_registry { std::tuple *..., pool_type *...> cpools{}; template - void maybe_valid_if(basic_registry &, const Entity entt, const Args &...) { + void maybe_valid_if(const basic_registry &, const Entity entt, const Args &...) { if constexpr(std::disjunction_v...>) { if(((std::is_same_v || std::get *>(cpools)->has(entt)) && ...) && !(std::get *>(cpools)->has(entt) || ...)) @@ -145,7 +145,7 @@ class basic_registry { } template - void discard_if(basic_registry &, const Entity entt, const Args &...) { + void discard_if(const basic_registry &, const Entity entt, const Args &...) { if(this->has(entt)) { this->destroy(entt); } @@ -158,7 +158,7 @@ class basic_registry { std::size_t owned{}; template - void maybe_valid_if(basic_registry &, const Entity entt, const Args &...) { + void maybe_valid_if(const basic_registry &, const Entity entt, const Args &...) { if constexpr(std::disjunction_v..., std::is_same...>) { if(((std::is_same_v || std::get *>(cpools)->has(entt)) && ...) && ((std::is_same_v || std::get *>(cpools)->has(entt)) && ...) @@ -179,7 +179,7 @@ class basic_registry { } template - void discard_if(basic_registry &, const Entity entt, const Args &...) { + void discard_if(const basic_registry &, const Entity entt, const Args &...) { if(std::get<0>(cpools)->has(entt) && std::get<0>(cpools)->sparse_set::get(entt) < this->owned) { const auto pos = --this->owned; (std::get *>(cpools)->swap(std::get *>(cpools)->sparse_set::get(entt), pos), ...);