From fd3e275d86ccbad79be5b0c0af956dbb9512ebfa Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 12 Sep 2024 17:50:59 +0200 Subject: [PATCH] sigh mixin: avoid nonsense warnings with g++ --- src/entt/entity/mixin.hpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/entt/entity/mixin.hpp b/src/entt/entity/mixin.hpp index e18a67c9f..e4a9331a7 100644 --- a/src/entt/entity/mixin.hpp +++ b/src/entt/entity/mixin.hpp @@ -136,18 +136,16 @@ public: construction{allocator}, destruction{allocator}, update{allocator} { - using element_type = typename Type::element_type; - - if constexpr(internal::has_on_construct::value) { - entt::sink{construction}.template connect<&element_type::on_construct>(); + if constexpr(internal::has_on_construct::value) { + entt::sink{construction}.template connect<&underlying_type::element_type::on_construct>(); } - if constexpr(internal::has_on_update::value) { - entt::sink{update}.template connect<&element_type::on_update>(); + if constexpr(internal::has_on_update::value) { + entt::sink{update}.template connect<&underlying_type::element_type::on_update>(); } - if constexpr(internal::has_on_destroy::value) { - entt::sink{destruction}.template connect<&element_type::on_destroy>(); + if constexpr(internal::has_on_destroy::value) { + entt::sink{destruction}.template connect<&underlying_type::element_type::on_destroy>(); } }