Browse Source

table: ::empty function

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

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

@@ -145,6 +145,14 @@ public:
         return std::get<0>(payload).size();
         return std::get<0>(payload).size();
     }
     }
 
 
+    /**
+     * @brief Checks whether a table is empty.
+     * @return True if the table is empty, false otherwise.
+     */
+    [[nodiscard]] bool empty() const noexcept {
+        return std::get<0>(payload).empty();
+    }
+
 private:
 private:
     container_type payload;
     container_type payload;
 };
 };