Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[line_interpolate] Fix infinite loop #1257

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions include/boost/geometry/algorithms/line_interpolate.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)

// Copyright (c) 2023 Adam Wulkiewicz, Lodz, Poland.
// Copyright (c) 2023-2024 Adam Wulkiewicz, Lodz, Poland.

// Copyright (c) 2018-2023 Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
Expand Down Expand Up @@ -135,7 +135,11 @@ struct interpolate_range
p,
diff_distance);
Policy::apply(p, pointlike);
if BOOST_GEOMETRY_CONSTEXPR (util::is_multi<PointLike>::value)
if BOOST_GEOMETRY_CONSTEXPR (util::is_point<PointLike>::value)
{
return;
}
else // else prevents unreachable code warning
{
start_p = p;
prev_distance = repeated_distance;
Expand Down
Loading