Sfoglia il codice sorgente

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

pokutnev 2 anni fa
parent
commit
51704ee7ce
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  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);
             sparse.first().resize(sz);
 
 
             for(auto &&elem: sparse.first()) {
             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) {
             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);
             sparse.first().resize(sz);
 
 
             for(auto &&elem: sparse.first()) {
             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) {
             for(size_type pos{}, last = size(); pos < last; ++pos) {