diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index 56fb38547..76f256448 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -31,11 +31,10 @@ template return first == last; } -template -[[nodiscard]] bool fully_initialized(const Type *const *it, const std::size_t len) noexcept { - std::size_t pos{}; - for(; (pos != len) && it[pos]; ++pos) {} - return pos == len; +template +[[nodiscard]] bool fully_initialized(It first, const It last) noexcept { + for(; (first != last) && *first; ++first) {} + return first == last; } template @@ -347,7 +346,7 @@ public: * @return True if the view is fully initialized, false otherwise. */ [[nodiscard]] explicit operator bool() const noexcept { - return (index != Get) && internal::fully_initialized(filter.data(), Exclude); + return (index != Get) && internal::fully_initialized(filter.begin(), filter.end()); } /**