diff options
Diffstat (limited to 'boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp')
-rw-r--r-- | boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp b/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp index 04d1095cba..57257dbdcc 100644 --- a/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp +++ b/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp @@ -35,6 +35,8 @@ #include <boost/geometry/algorithms/detail/distance/is_comparable.hpp> +#include <boost/geometry/util/condition.hpp> + namespace boost { namespace geometry { @@ -215,7 +217,7 @@ public: // consider all distances of the points in the geometry to the // segment or box - comparable_return_type cd_min1; + comparable_return_type cd_min1(0); point_iterator_type pit_min; seg_or_box_iterator_type it_min1 = seg_or_box_points.begin(); seg_or_box_iterator_type it_min2 = ++seg_or_box_points.begin(); @@ -246,7 +248,7 @@ public: // consider all distances of the points in the segment or box to the // segments of the geometry - comparable_return_type cd_min2; + comparable_return_type cd_min2(0); segment_iterator_type sit_min; typename std::vector<segment_or_box_point>::const_iterator it_min; @@ -271,7 +273,7 @@ public: } } - if (is_comparable<Strategy>::value) + if (BOOST_GEOMETRY_CONDITION(is_comparable<Strategy>::value)) { return (std::min)(cd_min1, cd_min2); } |