Просмотр исходного кода

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

pokutnev 2 лет назад
Родитель
Сommit
51704ee7ce
2 измененных файлов с 2 добавлено и 2 удалено
  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) {