From f1e59c4ea4fef5aedc395306d1cb6f95e4a95601 Mon Sep 17 00:00:00 2001 From: skypjack Date: Fri, 5 Dec 2025 18:11:23 +0100 Subject: [PATCH] container: cleanup --- src/entt/container/dense_map.hpp | 8 ++++---- src/entt/container/dense_set.hpp | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/entt/container/dense_map.hpp b/src/entt/container/dense_map.hpp index 82df5858c..9872cf1cf 100644 --- a/src/entt/container/dense_map.hpp +++ b/src/entt/container/dense_map.hpp @@ -205,7 +205,7 @@ public: offset{other.offset} {} constexpr dense_map_local_iterator &operator++() noexcept { - return (offset = it[static_cast(offset)].next), *this; + return (offset = it[static_cast(offset)].next), *this; } constexpr dense_map_local_iterator operator++(int) noexcept { @@ -218,7 +218,7 @@ public: } [[nodiscard]] constexpr reference operator*() const noexcept { - const auto idx = static_cast(offset); + const auto idx = static_cast(offset); return {it[idx].element.first, it[idx].element.second}; } @@ -279,7 +279,7 @@ class dense_map { [[nodiscard]] auto constrained_find(const Other &key, const std::size_t bucket) { for(auto offset = sparse.first()[bucket]; offset != placeholder_position; offset = packed.first()[offset].next) { if(packed.second()(packed.first()[offset].element.first, key)) { - return begin() + static_cast(offset); + return begin() + static_cast(offset); } } @@ -290,7 +290,7 @@ class dense_map { [[nodiscard]] auto constrained_find(const Other &key, const std::size_t bucket) const { for(auto offset = sparse.first()[bucket]; offset != placeholder_position; offset = packed.first()[offset].next) { if(packed.second()(packed.first()[offset].element.first, key)) { - return cbegin() + static_cast(offset); + return cbegin() + static_cast(offset); } } diff --git a/src/entt/container/dense_set.hpp b/src/entt/container/dense_set.hpp index 42ffa5014..37562dfc5 100644 --- a/src/entt/container/dense_set.hpp +++ b/src/entt/container/dense_set.hpp @@ -31,7 +31,7 @@ class dense_set_iterator final { friend class dense_set_iterator; public: - using value_type = typename It::value_type::second_type; + using value_type = It::value_type::second_type; using pointer = const value_type *; using reference = const value_type &; using difference_type = std::ptrdiff_t; @@ -149,7 +149,7 @@ class dense_set_local_iterator final { friend class dense_set_local_iterator; public: - using value_type = typename It::value_type::second_type; + using value_type = It::value_type::second_type; using pointer = const value_type *; using reference = const value_type &; using difference_type = std::ptrdiff_t; @@ -167,7 +167,7 @@ public: offset{other.offset} {} constexpr dense_set_local_iterator &operator++() noexcept { - return offset = it[static_cast(offset)].first, *this; + return offset = it[static_cast(offset)].first, *this; } constexpr dense_set_local_iterator operator++(int) noexcept { @@ -176,7 +176,7 @@ public: } [[nodiscard]] constexpr pointer operator->() const noexcept { - return std::addressof(it[static_cast(offset)].second); + return std::addressof(it[static_cast(offset)].second); } [[nodiscard]] constexpr reference operator*() const noexcept { @@ -238,7 +238,7 @@ class dense_set { [[nodiscard]] auto constrained_find(const Other &value, const std::size_t bucket) { for(auto offset = sparse.first()[bucket]; offset != placeholder_position; offset = packed.first()[offset].first) { if(packed.second()(packed.first()[offset].second, value)) { - return begin() + static_cast(offset); + return begin() + static_cast(offset); } } @@ -249,7 +249,7 @@ class dense_set { [[nodiscard]] auto constrained_find(const Other &value, const std::size_t bucket) const { for(auto offset = sparse.first()[bucket]; offset != placeholder_position; offset = packed.first()[offset].first) { if(packed.second()(packed.first()[offset].second, value)) { - return cbegin() + static_cast(offset); + return cbegin() + static_cast(offset); } }