mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-13 12:32:09 +00:00
Merge pull request #191 from mkaravel/fix/maybe-uninitialized-warning
[algorithms][closest_feature] initialize variable passed by reference to...
This commit is contained in:
@@ -60,6 +60,7 @@ private:
|
||||
BOOST_ASSERT( queries_first != queries_last );
|
||||
|
||||
Distance const zero = Distance(0);
|
||||
dist_min = zero;
|
||||
|
||||
// create -- packing algorithm
|
||||
rtree_type rt(rtree_first, rtree_last);
|
||||
|
||||
@@ -215,7 +215,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 +246,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;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ struct one_to_many
|
||||
>::type distance_type;
|
||||
|
||||
bool first = true;
|
||||
distance_type d_min;
|
||||
distance_type d_min(0);
|
||||
for (Iterator it = begin; it != end; ++it, first = false)
|
||||
{
|
||||
distance_type d = Policy::apply(geometry, *it, strategy);
|
||||
|
||||
Reference in New Issue
Block a user