Skip to content

Commit

Permalink
Merge pull request #1257 from awulkiew/fix/constexpr_line_interpolate
Browse files Browse the repository at this point in the history
[line_interpolate] Fix infinite loop
  • Loading branch information
vissarion authored Mar 5, 2024
2 parents 88d0076 + 8b92025 commit 29a209d
Showing 1 changed file with 6 additions and 2 deletions.
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

0 comments on commit 29a209d

Please sign in to comment.