Skip to content

Commit

Permalink
mixin: suppress warning due to constepxr expression
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Oct 6, 2023
1 parent 25bbc4e commit 283ad71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/entt/entity/mixin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ class sigh_mixin final: public Type {
if constexpr(std::is_same_v<typename underlying_type::value_type, typename underlying_type::entity_type>) {
destruction.publish(reg, *it);
} else {
if(const auto entt = *it; !underlying_type::traits_type::in_place_delete || entt != tombstone) {
destruction.publish(reg, entt);
if(underlying_type::traits_type::in_place_delete) {
if(const auto entt = *it; entt != tombstone) {
destruction.publish(reg, entt);
}
} else {
destruction.publish(reg, *it);
}
}
}
Expand Down

0 comments on commit 283ad71

Please sign in to comment.