Pārlūkot izejas kodu

*: fix C4003 NOMINMAX issue (#531)

cugone 5 gadi atpakaļ
vecāks
revīzija
fc8e8874a9
2 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. 1 0
      AUTHORS
  2. 3 3
      src/entt/entity/view.hpp

+ 1 - 0
AUTHORS

@@ -11,6 +11,7 @@ ceeac
 ColinH
 ColinH
 corystegel
 corystegel
 Croydon
 Croydon
+cugone
 dbacchet
 dbacchet
 dBagrat
 dBagrat
 djarek
 djarek

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

@@ -240,7 +240,7 @@ class basic_view<Entity, exclude_t<Exclude...>, Component...> {
     {}
     {}
 
 
     [[nodiscard]] const sparse_set<Entity> & candidate() const ENTT_NOEXCEPT {
     [[nodiscard]] const sparse_set<Entity> & candidate() const ENTT_NOEXCEPT {
-        return *std::min({ static_cast<const sparse_set<Entity> *>(std::get<pool_type<Component> *>(pools))... }, [](const auto *lhs, const auto *rhs) {
+        return *(std::min)({ static_cast<const sparse_set<Entity> *>(std::get<pool_type<Component> *>(pools))... }, [](const auto *lhs, const auto *rhs) {
             return lhs->size() < rhs->size();
             return lhs->size() < rhs->size();
         });
         });
     }
     }
@@ -303,7 +303,7 @@ class basic_view<Entity, exclude_t<Exclude...>, Component...> {
         while(first != last) {
         while(first != last) {
             if((std::get<pool_type<Component> *>(pools)->contains(*first) && ...) && std::none_of(filter.cbegin(), filter.cend(), [entt = *first](const sparse_set<Entity> *cpool) { return cpool->contains(entt); })) {
             if((std::get<pool_type<Component> *>(pools)->contains(*first) && ...) && std::none_of(filter.cbegin(), filter.cend(), [entt = *first](const sparse_set<Entity> *cpool) { return cpool->contains(entt); })) {
                 const auto base = *(first++);
                 const auto base = *(first++);
-                const auto chunk = std::min({ (std::get<pool_type<Component> *>(pools)->size() - std::get<pool_type<Component> *>(pools)->index(base))... });
+                const auto chunk = (std::min)({ (std::get<pool_type<Component> *>(pools)->size() - std::get<pool_type<Component> *>(pools)->index(base))... });
                 size_type length{};
                 size_type length{};
 
 
                 for(++length;
                 for(++length;
@@ -345,7 +345,7 @@ public:
      * @return Estimated number of entities iterated by the view.
      * @return Estimated number of entities iterated by the view.
      */
      */
     [[nodiscard]] size_type size() const ENTT_NOEXCEPT {
     [[nodiscard]] size_type size() const ENTT_NOEXCEPT {
-        return std::min({ std::get<pool_type<Component> *>(pools)->size()... });
+        return (std::min)({ std::get<pool_type<Component> *>(pools)->size()... });
     }
     }
 
 
     /**
     /**