Răsfoiți Sursa

container: workaround for the max() ambiguity with MAX macro (#1034)

pokutnev 2 ani în urmă
părinte
comite
51704ee7ce
2 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 1 1
      src/entt/container/dense_map.hpp
  2. 1 1
      src/entt/container/dense_set.hpp

+ 1 - 1
src/entt/container/dense_map.hpp

@@ -989,7 +989,7 @@ public:
             sparse.first().resize(sz);
 
             for(auto &&elem: sparse.first()) {
-                elem = std::numeric_limits<size_type>::max();
+                elem = (std::numeric_limits<size_type>::max)();
             }
 
             for(size_type pos{}, last = size(); pos < last; ++pos) {

+ 1 - 1
src/entt/container/dense_set.hpp

@@ -886,7 +886,7 @@ public:
             sparse.first().resize(sz);
 
             for(auto &&elem: sparse.first()) {
-                elem = std::numeric_limits<size_type>::max();
+                elem = (std::numeric_limits<size_type>::max)();
             }
 
             for(size_type pos{}, last = size(); pos < last; ++pos) {