Преглед на файлове

mixin: use if constexpr as it should be

Michele Caini преди 2 години
родител
ревизия
39f6349878
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/entt/entity/mixin.hpp

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

@@ -55,7 +55,7 @@ class sigh_mixin final: public Type {
                 if constexpr(std::is_same_v<typename underlying_type::value_type, typename underlying_type::entity_type>) {
                 if constexpr(std::is_same_v<typename underlying_type::value_type, typename underlying_type::entity_type>) {
                     destruction.publish(reg, *it);
                     destruction.publish(reg, *it);
                 } else {
                 } else {
-                    if(underlying_type::traits_type::in_place_delete) {
+                    if constexpr(underlying_type::traits_type::in_place_delete) {
                         if(const auto entt = *it; entt != tombstone) {
                         if(const auto entt = *it; entt != tombstone) {
                             destruction.publish(reg, entt);
                             destruction.publish(reg, entt);
                         }
                         }