|
@@ -23,7 +23,8 @@ namespace internal {
|
|
|
template<typename Type>
|
|
template<typename Type>
|
|
|
class runtime_view_iterator final {
|
|
class runtime_view_iterator final {
|
|
|
[[nodiscard]] bool valid() const {
|
|
[[nodiscard]] bool valid() const {
|
|
|
- return std::all_of(pools->begin(), pools->end(), [entt = *it](const auto *curr) { return curr->contains(entt); })
|
|
|
|
|
|
|
+ return (!tombstone_check || *it != tombstone)
|
|
|
|
|
+ && std::all_of(++pools->begin(), pools->end(), [entt = *it](const auto *curr) { return curr->contains(entt); })
|
|
|
&& std::none_of(filter->cbegin(), filter->cend(), [entt = *it](const auto *curr) { return curr && curr->contains(entt); });
|
|
&& std::none_of(filter->cbegin(), filter->cend(), [entt = *it](const auto *curr) { return curr && curr->contains(entt); });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -40,7 +41,8 @@ public:
|
|
|
runtime_view_iterator(const std::vector<const Type *> &cpools, const std::vector<const Type *> &ignore, iterator_type curr) ENTT_NOEXCEPT
|
|
runtime_view_iterator(const std::vector<const Type *> &cpools, const std::vector<const Type *> &ignore, iterator_type curr) ENTT_NOEXCEPT
|
|
|
: pools{&cpools},
|
|
: pools{&cpools},
|
|
|
filter{&ignore},
|
|
filter{&ignore},
|
|
|
- it{curr} {
|
|
|
|
|
|
|
+ it{curr},
|
|
|
|
|
+ tombstone_check{pools->size() == 1u && (*pools)[0u]->policy() == deletion_policy::in_place} {
|
|
|
if(it != (*pools)[0]->end() && !valid()) {
|
|
if(it != (*pools)[0]->end() && !valid()) {
|
|
|
++(*this);
|
|
++(*this);
|
|
|
}
|
|
}
|
|
@@ -86,6 +88,7 @@ private:
|
|
|
const std::vector<const Type *> *pools;
|
|
const std::vector<const Type *> *pools;
|
|
|
const std::vector<const Type *> *filter;
|
|
const std::vector<const Type *> *filter;
|
|
|
iterator_type it;
|
|
iterator_type it;
|
|
|
|
|
+ bool tombstone_check;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
} // namespace internal
|
|
} // namespace internal
|