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

dense_hash_[map/set]: suppress super annoying warnings

Michele Caini 4 лет назад
Родитель
Сommit
a03b88e0eb
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      src/entt/container/dense_hash_map.hpp
  2. 1 1
      src/entt/container/dense_hash_set.hpp

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

@@ -909,7 +909,7 @@ public:
      */
     void rehash(const size_type count) {
         auto value = (std::max)(count, minimum_capacity);
-        value = std::max<size_type>(value, size() / max_load_factor());
+        value = (std::max)(value, static_cast<size_type>(size() / max_load_factor()));
 
         if(const auto sz = next_power_of_two(value); sz != bucket_count()) {
             sparse.first().resize(sz);

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

@@ -799,7 +799,7 @@ public:
      */
     void rehash(const size_type count) {
         auto value = (std::max)(count, minimum_capacity);
-        value = std::max<size_type>(value, size() / max_load_factor());
+        value = (std::max)(value, static_cast<size_type>(size() / max_load_factor()));
 
         if(const auto sz = next_power_of_two(value); sz != bucket_count()) {
             sparse.first().resize(sz);