diff --git a/2019/src/day15.cpp b/2019/src/day15.cpp index bdf37cd..8c0d90b 100644 --- a/2019/src/day15.cpp +++ b/2019/src/day15.cpp @@ -145,7 +145,7 @@ void aoc2019::day15_part1(std::istream &input, std::ostream &output) { void aoc2019::day15_part2(std::istream &input, std::ostream &output) { const auto map = read_map(input); - auto starting_point = std::find_if(map.begin(), map.end(), [](auto x) { return x.second == Tile::Oxygen; })->first; + auto starting_point = std::find_if(map.begin(), map.end(), [](auto &x) { return x.second == Tile::Oxygen; })->first; auto dist = bfs(map, starting_point, [](Tile x) { return false; });