diff --git a/2019/src/day10.cpp b/2019/src/day10.cpp index 33bf1d0..f08a48d 100644 --- a/2019/src/day10.cpp +++ b/2019/src/day10.cpp @@ -38,9 +38,11 @@ namespace { std::pair part1(const std::vector &points) { std::size_t best = 0; std::size_t best_index = 0; + std::unordered_set visible; for (std::size_t i = 0; i < points.size(); ++i) { - std::unordered_set visible; + visible.clear(); + const auto point = points[i]; for (auto asteroid : points) {