Skip to content

Commit 7802935

Browse files
committed
conversion fix
1 parent 1a5767d commit 7802935

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

include/osp/auxiliary/datastructures/union_find.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ class UnionFindUniverse {
126126

127127
// Reserve map to avoid rehashes
128128
IndexT currentMapSize = static_cast<IndexT>(namesToIndices_.size());
129-
IndexT currentMapCapacity = static_cast<IndexT>(namesToIndices_.bucket_count() * namesToIndices_.max_load_factor());
129+
IndexT currentMapCapacity
130+
= static_cast<IndexT>(static_cast<float>(namesToIndices_.bucket_count()) * namesToIndices_.max_load_factor());
130131

131132
if (currentMapSize + addSize > currentMapCapacity) {
132133
IndexT newMinMapCapacity = std::max((currentMapCapacity + 1) / 2 * 3, currentMapSize + addSize);

0 commit comments

Comments
 (0)