geom/sample: defend against maybe unused variable

This commit is contained in:
Danny Robson 2018-05-18 13:51:34 +10:00
parent e77f59e3ae
commit b7a4b8d1c0

View File

@ -160,7 +160,7 @@ namespace util::geom {
// points is the greatest (while also being greater than the
// required minimum distance);
auto best_distance2 = std::numeric_limits<value_type>::lowest ();
size_t best_index;
size_t best_index = 0;
for (size_t i = 0; i < candidates.size (); ++i) {
auto const p = candidates[i];