From 766a233f37b0c1995b86f8040a6dbf2d644550ba Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 23 Mar 2023 16:42:13 +0100 Subject: [PATCH] view: base_type -> common_type --- src/entt/entity/view.hpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index a2bb70eda..35f02e93e 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -200,7 +200,7 @@ class basic_view; template class basic_view, exclude_t> { using underlying_type = std::common_type_t; - using basic_common_type = std::common_type_t; + using base_type = std::common_type_t; template friend class basic_view; @@ -209,7 +209,7 @@ class basic_view, exclude_t> { static constexpr std::size_t index_of = type_list_index_v, type_list>; [[nodiscard]] auto opaque_check_set() const noexcept { - std::array other{}; + std::array other{}; std::apply([&other, pos = 0u, view = view](const auto *...curr) mutable { ((curr == view ? void() : void(other[pos++] = curr)), ...); }, pools); return other; } @@ -247,9 +247,9 @@ public: /*! @brief Unsigned integer type. */ using size_type = std::size_t; /*! @brief Common type among all storage types. */ - using base_type = basic_common_type; + using common_type = base_type; /*! @brief Bidirectional iterator type. */ - using iterator = internal::view_iterator; + using iterator = internal::view_iterator; /*! @brief Iterable view type. */ using iterable = iterable_adaptor>; @@ -313,7 +313,7 @@ public: * @brief Returns the leading storage of a view. * @return The leading storage of the view. */ - [[nodiscard]] const base_type &handle() const noexcept { + [[nodiscard]] const common_type &handle() const noexcept { return *view; } @@ -522,8 +522,8 @@ public: private: std::tuple pools; - std::array filter; - const base_type *view; + std::array filter; + const common_type *view; }; /** @@ -558,11 +558,11 @@ public: /*! @brief Unsigned integer type. */ using size_type = std::size_t; /*! @brief Common type among all storage types. */ - using base_type = typename Get::base_type; + using common_type = typename Get::base_type; /*! @brief Random access iterator type. */ - using iterator = typename base_type::iterator; + using iterator = typename common_type::iterator; /*! @brief Reversed iterator type. */ - using reverse_iterator = typename base_type::reverse_iterator; + using reverse_iterator = typename common_type::reverse_iterator; /*! @brief Iterable view type. */ using iterable = decltype(std::declval().each()); @@ -592,7 +592,7 @@ public: * @brief Returns the leading storage of a view. * @return The leading storage of the view. */ - [[nodiscard]] const base_type &handle() const noexcept { + [[nodiscard]] const common_type &handle() const noexcept { return *view; } @@ -843,8 +843,8 @@ public: private: std::tuple pools; - std::array filter; - const base_type *view; + std::array filter; + const common_type *view; }; /**