dense_hash_[map/set]: suppress super annoying warnings

This commit is contained in:
Michele Caini
2022-01-07 14:07:35 +01:00
parent 4472eb1c40
commit a03b88e0eb
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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);