mirror of
https://github.com/boostorg/geometry.git
synced 2026-01-31 08:12:13 +00:00
Fix line_interpolate termination condition for single points. (#1003)
* Fix line_interpolation termination condition for single points. * Use is_point utility and BG_CONDITION macro to prevent potential msvc 2017 warning over constant condition without if constexpr.
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
#include <boost/geometry/strategies/line_interpolate/geographic.hpp>
|
||||
#include <boost/geometry/strategies/line_interpolate/spherical.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@@ -130,7 +133,7 @@ struct interpolate_range
|
||||
p,
|
||||
diff_distance);
|
||||
Policy::apply(p, pointlike);
|
||||
if (std::is_same<PointLike, point_t>::value)
|
||||
if ( BOOST_GEOMETRY_CONDITION(util::is_point<PointLike>::value) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user