diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index a1c862bec..aea61ebd6 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -45,7 +45,7 @@ class basic_registry { using traits_type = entt_traits>; template - struct pool_handler: storage { + struct pool_handler final: storage { static_assert(std::is_same_v>); std::size_t super{}; diff --git a/src/entt/entity/runtime_view.hpp b/src/entt/entity/runtime_view.hpp index 7a637a6b5..56f40a045 100644 --- a/src/entt/entity/runtime_view.hpp +++ b/src/entt/entity/runtime_view.hpp @@ -60,7 +60,7 @@ class basic_runtime_view { using underlying_iterator_type = typename sparse_set::iterator_type; - class iterator { + class iterator final { friend class basic_runtime_view; using direct_type = std::vector *>; diff --git a/src/entt/entity/sparse_set.hpp b/src/entt/entity/sparse_set.hpp index a578f5050..9e8db478a 100644 --- a/src/entt/entity/sparse_set.hpp +++ b/src/entt/entity/sparse_set.hpp @@ -52,7 +52,7 @@ class sparse_set { static_assert(ENTT_PAGE_SIZE && ((ENTT_PAGE_SIZE & (ENTT_PAGE_SIZE - 1)) == 0)); static constexpr auto entt_per_page = ENTT_PAGE_SIZE / sizeof(typename traits_type::entity_type); - class iterator { + class iterator final { friend class sparse_set; using direct_type = std::vector; diff --git a/src/entt/entity/storage.hpp b/src/entt/entity/storage.hpp index 7863ec277..f853a5c4c 100644 --- a/src/entt/entity/storage.hpp +++ b/src/entt/entity/storage.hpp @@ -52,7 +52,7 @@ class storage: public sparse_set { using traits_type = entt_traits>; template - class iterator { + class iterator final { friend class storage; using instance_type = std::conditional_t, std::vector>; @@ -489,7 +489,7 @@ class storage>: public spa using traits_type = entt_traits>; using underlying_type = sparse_set; - class iterator { + class iterator final { friend class storage; using index_type = typename traits_type::difference_type; diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index fe1389638..0351ad1e2 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -78,7 +78,7 @@ class basic_view, Component...> { using unchecked_type = std::array *, (sizeof...(Component) - 1)>; using filter_type = std::array *, sizeof...(Exclude)>; - class iterator { + class iterator final { friend class basic_view, Component...>; iterator(const sparse_set *candidate, unchecked_type other, filter_type ignore, underlying_iterator_type curr) ENTT_NOEXCEPT diff --git a/src/entt/signal/dispatcher.hpp b/src/entt/signal/dispatcher.hpp index 5f4d8273e..e5e858114 100644 --- a/src/entt/signal/dispatcher.hpp +++ b/src/entt/signal/dispatcher.hpp @@ -37,7 +37,7 @@ class dispatcher { }; template - struct pool_handler: basic_pool { + struct pool_handler final: basic_pool { using signal_type = sigh; using sink_type = typename signal_type::sink_type; diff --git a/src/entt/signal/emitter.hpp b/src/entt/signal/emitter.hpp index 78bd98c26..18fe07512 100644 --- a/src/entt/signal/emitter.hpp +++ b/src/entt/signal/emitter.hpp @@ -49,7 +49,7 @@ class emitter { }; template - struct pool_handler: basic_pool { + struct pool_handler final: basic_pool { using listener_type = std::function; using element_type = std::pair; using container_type = std::list;