Michele Caini 2 лет назад
Родитель
Сommit
f2a8c0ffe6
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      src/entt/entity/storage.hpp

+ 6 - 0
src/entt/entity/storage.hpp

@@ -957,6 +957,12 @@ class basic_storage<Entity, Entity, Allocator>
     }
 
 protected:
+    /*! @brief Erases all entities of a storage. */
+    void pop_all() override {
+        base_type::pop_all();
+        next = {};
+    }
+
     /**
      * @brief Assigns an entity to a storage.
      * @param hint A valid identifier.