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

dense_set: suppress warnings due to possible narrowing conversions

Michele Caini 3 лет назад
Родитель
Сommit
ccedacec8c
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/entt/container/dense_set.hpp

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

@@ -237,7 +237,7 @@ class dense_set {
 
 
     template<typename Other>
     template<typename Other>
     [[nodiscard]] std::size_t value_to_bucket(const Other &value) const noexcept {
     [[nodiscard]] std::size_t value_to_bucket(const Other &value) const noexcept {
-        return fast_mod(sparse.second()(value), bucket_count());
+        return fast_mod(static_cast<size_type>(sparse.second()(value)), bucket_count());
     }
     }
 
 
     template<typename Other>
     template<typename Other>