Skip to content

Commit

Permalink
Merge pull request #209 from jendrikseipp/patch-1
Browse files Browse the repository at this point in the history
Allow compiling with -Wfloat-conversion
  • Loading branch information
greg7mdp authored Oct 1, 2023
2 parents a7909d5 + 0412b85 commit c2fabc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parallel_hashmap/phmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ class raw_hash_set

size_t bucket_count() const { return capacity_; }
float load_factor() const {
return capacity_ ? static_cast<double>(size()) / capacity_ : 0.0;
return capacity_ ? static_cast<float>(static_cast<double>(size()) / capacity_) : 0.0f;
}
float max_load_factor() const { return 1.0f; }
void max_load_factor(float) {
Expand Down

0 comments on commit c2fabc9

Please sign in to comment.