فهرست منبع

registry: clean up ::remove_all

Michele Caini 4 سال پیش
والد
کامیت
7d7c36e0c7
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      src/entt/entity/registry.hpp

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

@@ -737,11 +737,10 @@ public:
      */
     void remove_all(const entity_type entity) {
         ENTT_ASSERT(valid(entity), "Invalid entity");
-        entity_type wrap[1u]{entity};
 
         for(auto pos = pools.size(); pos; --pos) {
             if(auto &pdata = pools[pos-1]; pdata.pool && pdata.pool->contains(entity)) {
-                pdata.pool->erase(std::begin(wrap), std::end(wrap), this);
+                pdata.pool->erase(entity, this);
             }
         }
     }