Michele Caini 2 лет назад
Родитель
Сommit
dd4a291272
1 измененных файлов с 8 добавлено и 0 удалено
  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();
     }
 
+    /**
+     * @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:
     container_type payload;
 };