Просмотр исходного кода

view/group: opaque pointer type for ::data

Michele Caini 4 лет назад
Родитель
Сommit
656c12cebd
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      src/entt/entity/group.hpp
  2. 1 1
      src/entt/entity/view.hpp

+ 2 - 2
src/entt/entity/group.hpp

@@ -208,7 +208,7 @@ public:
      *
      *
      * @return A pointer to the array of entities.
      * @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;
         return *this ? handler->data() : nullptr;
     }
     }
 
 
@@ -688,7 +688,7 @@ public:
      *
      *
      * @return A pointer to the array of entities.
      * @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;
         return *this ? std::get<0>(pools)->data() : nullptr;
     }
     }
 
 

+ 1 - 1
src/entt/entity/view.hpp

@@ -716,7 +716,7 @@ public:
      *
      *
      * @return A pointer to the array of entities.
      * @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();
         return std::get<0>(pools)->data();
     }
     }