diff --git a/geom/sample.hpp b/geom/sample.hpp index 41f1d6a0..c722a657 100644 --- a/geom/sample.hpp +++ b/geom/sample.hpp @@ -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::lowest (); - size_t best_index; + size_t best_index = 0; for (size_t i = 0; i < candidates.size (); ++i) { auto const p = candidates[i];