diff --git a/src/entt/entity/group.hpp b/src/entt/entity/group.hpp index d70b4ec2c..dc143a745 100644 --- a/src/entt/entity/group.hpp +++ b/src/entt/entity/group.hpp @@ -208,7 +208,7 @@ public: * * @return A pointer to the array of entities. */ - [[nodiscard]] const entity_type * data() const ENTT_NOEXCEPT { + [[nodiscard]] auto data() const ENTT_NOEXCEPT { return *this ? handler->data() : nullptr; } @@ -688,7 +688,7 @@ public: * * @return A pointer to the array of entities. */ - [[nodiscard]] const entity_type * data() const ENTT_NOEXCEPT { + [[nodiscard]] auto data() const ENTT_NOEXCEPT { return *this ? std::get<0>(pools)->data() : nullptr; } diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index e0753cf73..6b44ba78e 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -716,7 +716,7 @@ public: * * @return A pointer to the array of entities. */ - [[nodiscard]] const entity_type * data() const ENTT_NOEXCEPT { + [[nodiscard]] auto data() const ENTT_NOEXCEPT { return std::get<0>(pools)->data(); }