From 32bd18bf08eb702e66f23026f34d9483052154b4 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 18 Apr 2024 16:44:13 +0200 Subject: [PATCH] table: ::size function --- src/entt/entity/table.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/entt/entity/table.hpp b/src/entt/entity/table.hpp index 7a009aeb2..336e36dd4 100644 --- a/src/entt/entity/table.hpp +++ b/src/entt/entity/table.hpp @@ -137,6 +137,14 @@ public: (std::get>(payload).shrink_to_fit(), ...); } + /** + * @brief Returns the number of rows in a table. + * @return Number of rows. + */ + [[nodiscard]] size_type size() const noexcept { + return std::get<0>(payload).size(); + } + private: container_type payload; };