Skip to content

Commit 4fa191d

Browse files
committed
[rstar]: Use the dynamic type while calling epsilon().
Current call to epsilon is made with the assumption that the dynamic type `content_type` is compatible with double. This does not hold true for numeric types that are bigger than double, e.g: `absl::uint128`. This CL fixes it by binding the call to `content_type`'s type.
1 parent 5ad341e commit 4fa191d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class choose_next_node<MembersHolder, choose_by_overlap_diff_tag>
132132

133133
// is this assumption ok? if min_content_diff == 0 there is no overlap increase?
134134

135-
if ( min_content_diff < -std::numeric_limits<double>::epsilon() || std::numeric_limits<double>::epsilon() < min_content_diff )
135+
if ( min_content_diff < -std::numeric_limits<content_type>::epsilon() || std::numeric_limits<content_type>::epsilon() < min_content_diff )
136136
{
137137
size_t first_n_children_count = children_count;
138138
if ( 0 < overlap_cost_threshold && overlap_cost_threshold < children.size() )

0 commit comments

Comments
 (0)