mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 16:40:39 +08:00
Static cast to float after division.
This commit is contained in:
committed by
GitHub
parent
b0f117d58e
commit
0412b85b08
Vendored
+1
-1
@@ -1806,7 +1806,7 @@ public:
|
||||
|
||||
size_t bucket_count() const { return capacity_; }
|
||||
float load_factor() const {
|
||||
return capacity_ ? static_cast<float>(size()) / capacity_ : 0.0f;
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user