skypjack 3 settimane fa
parent
commit
2975d14352

+ 3 - 3
src/entt/entity/registry.hpp

@@ -580,7 +580,7 @@ public:
      */
     template<typename Type>
     void insert(stl::input_iterator auto first, stl::input_iterator auto last, const Type &value = {}) {
-        ENTT_ASSERT(std::all_of(first, last, [this](const auto entt) { return valid(entt); }), "Invalid entity");
+        ENTT_ASSERT(stl::all_of(first, last, [this](const auto entt) { return valid(entt); }), "Invalid entity");
         assure<Type>().insert(stl::move(first), stl::move(last), value);
     }
 
@@ -599,7 +599,7 @@ public:
     template<typename Type, typename EIt, typename CIt>
     requires stl::same_as<typename stl::iterator_traits<CIt>::value_type, Type>
     void insert(EIt first, EIt last, CIt from) {
-        ENTT_ASSERT(std::all_of(first, last, [this](const auto entt) { return valid(entt); }), "Invalid entity");
+        ENTT_ASSERT(stl::all_of(first, last, [this](const auto entt) { return valid(entt); }), "Invalid entity");
         assure<Type>().insert(first, last, from);
     }
 
@@ -1058,7 +1058,7 @@ public:
             handler = std::allocate_shared<handler_type>(get_allocator(), get_allocator(), stl::forward_as_tuple(assure<stl::remove_const_t<Get>>()...), stl::forward_as_tuple(assure<stl::remove_const_t<Exclude>>()...));
         } else {
             handler = std::allocate_shared<handler_type>(get_allocator(), stl::forward_as_tuple(assure<stl::remove_const_t<Owned>>()..., assure<stl::remove_const_t<Get>>()...), stl::forward_as_tuple(assure<stl::remove_const_t<Exclude>>()...));
-            ENTT_ASSERT(std::all_of(groups.cbegin(), groups.cend(), [](const auto &data) { return !(data.second->owned(type_id<Owned>().hash()) || ...); }), "Conflicting groups");
+            ENTT_ASSERT(stl::all_of(groups.cbegin(), groups.cend(), [](const auto &data) { return !(data.second->owned(type_id<Owned>().hash()) || ...); }), "Conflicting groups");
         }
 
         groups.emplace(group_type::group_id(), handler);

+ 2 - 2
src/entt/entity/runtime_view.hpp

@@ -21,7 +21,7 @@ class runtime_view_iterator final {
 
     [[nodiscard]] bool valid() const {
         return (!tombstone_check || *it != tombstone)
-               && std::all_of(++pools->begin(), pools->end(), [entt = *it](const auto *curr) { return curr->contains(entt); })
+               && stl::all_of(++pools->begin(), pools->end(), [entt = *it](const auto *curr) { return curr->contains(entt); })
                && stl::none_of(filter->cbegin(), filter->cend(), [entt = *it](const auto *curr) { return curr && curr->contains(entt); });
     }
 
@@ -286,7 +286,7 @@ public:
      */
     [[nodiscard]] bool contains(const entity_type entt) const {
         return !pools.empty()
-               && std::all_of(pools.cbegin(), pools.cend(), [entt](const auto *curr) { return curr->contains(entt); })
+               && stl::all_of(pools.cbegin(), pools.cend(), [entt](const auto *curr) { return curr->contains(entt); })
                && stl::none_of(filter.cbegin(), filter.cend(), [entt](const auto *curr) { return curr && curr->contains(entt); })
                && pools.front()->index(entt) < offset();
     }

+ 1 - 0
src/entt/stl/algorithm.hpp

@@ -6,6 +6,7 @@
 /*! @cond ENTT_INTERNAL */
 namespace entt::stl {
 
+using std::all_of;
 using std::none_of;
 using std::sort;