From 656c12cebd4efef15c5bf19a25e373b6cb941520 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Sun, 16 May 2021 23:51:36 +0200 Subject: [PATCH] view/group: opaque pointer type for ::data --- src/entt/entity/group.hpp | 4 ++-- src/entt/entity/view.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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(); }