sigh_mixin: minor changes

This commit is contained in:
Michele Caini
2024-03-22 23:25:34 +01:00
parent 38b6fb2133
commit ad081f41db

View File

@@ -37,11 +37,12 @@ class basic_sigh_mixin final: public Type {
static_assert(std::is_base_of_v<basic_registry_type, owner_type>, "Invalid registry type");
owner_type &owner_or_assert() const noexcept {
auto &owner_or_assert() const noexcept {
ENTT_ASSERT(owner != nullptr, "Invalid pointer to registry");
return static_cast<owner_type &>(*owner);
}
private:
void pop(underlying_iterator first, underlying_iterator last) final {
if(auto &reg = owner_or_assert(); destruction.empty()) {
underlying_type::pop(first, last);