Skip to content

Commit

Permalink
distance_to_polyline: generic return type
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Sep 8, 2024
1 parent 0a14add commit 66b3488
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/geo/polyline.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ struct polyline_candidate {
std::size_t segment_idx_;
};

template <typename Polyline>
polyline_candidate distance_to_polyline(latlng const& x, Polyline&& c) {
template <typename Candidate = polyline_candidate, typename Polyline>
Candidate distance_to_polyline(latlng const& x, Polyline&& c) {
auto min = std::numeric_limits<double>::max();
auto best = latlng{};
auto best_segment_idx = 0U;
Expand Down

0 comments on commit 66b3488

Please sign in to comment.