Browse Source

table: ::clear function

Michele Caini 1 year ago
parent
commit
4a3f83a7b8
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/entt/entity/table.hpp

+ 5 - 0
src/entt/entity/table.hpp

@@ -153,6 +153,11 @@ public:
         return std::get<0>(payload).empty();
     }
 
+    /*! @brief Clears a table. */
+    void clear() {
+        (std::get<container_for<Row>>(payload).clear(), ...);
+    }
+
 private:
     container_type payload;
 };