From e216fa98ef57fa61c43335ae68421f76f256ac1e Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 16 Sep 2019 22:37:38 +0200 Subject: [PATCH] cleanup --- src/entt/entity/registry.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index 852faaea0..66ef6498b 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -166,7 +166,7 @@ class basic_registry { && ((std::is_same_v || std::get *>(cpools)->has(entt)) && ...) && !(std::get *>(cpools)->has(entt) || ...)) { - const auto pos = this->owned++; + const auto pos = owned++; (std::get *>(cpools)->swap(std::get *>(cpools)->data()[pos], entt), ...); } } else if constexpr(std::disjunction_v...>) { @@ -174,15 +174,15 @@ class basic_registry { && (std::get *>(cpools)->has(entt) && ...) && ((std::is_same_v || !std::get *>(cpools)->has(entt)) && ...)) { - const auto pos = this->owned++; + const auto pos = owned++; (std::get *>(cpools)->swap(std::get *>(cpools)->data()[pos], entt), ...); } } } void discard_if(const Entity entt) { - if(std::get<0>(cpools)->has(entt) && std::get<0>(cpools)->index(entt) < this->owned) { - const auto pos = --this->owned; + if(std::get<0>(cpools)->has(entt) && std::get<0>(cpools)->index(entt) < owned) { + const auto pos = --owned; (std::get *>(cpools)->swap(std::get *>(cpools)->data()[pos], entt), ...); } } @@ -1414,7 +1414,6 @@ public: curr->set.construct(entity); } else { const auto pos = curr->owned++; - // useless this-> used to suppress a warning with clang (std::get *>(cpools)->swap(std::get *>(cpools)->data()[pos], entity), ...); } }