Преглед изворни кода

registry: suppress some warnings

Michele Caini пре 5 година
родитељ
комит
23f0fcd024
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/entt/entity/registry.hpp

+ 2 - 2
src/entt/entity/registry.hpp

@@ -758,7 +758,7 @@ public:
     size_type remove_if_exists(const entity_type entity) {
         ENTT_ASSERT(valid(entity));
 
-        return ([this, entity](auto &&cpool) {
+        return ([entity](auto &&cpool) {
             return cpool.contains(entity) ? (cpool.erase(entity), true) : false;
         }(assure<Component>()) + ... + size_type{});
     }
@@ -939,7 +939,7 @@ public:
             // useless this-> used to suppress a warning with clang
             each([this](const auto entity) { this->destroy(entity); });
         } else {
-            ([this](auto &&cpool) {
+            ([](auto &&cpool) {
                 cpool.erase(cpool.sparse_set<entity_type>::begin(), cpool.sparse_set<entity_type>::end());
             }(assure<Component>()), ...);
         }