Fix typos in PostProcessNetworks

This commit is contained in:
Jonathan G Rennison
2021-10-24 13:33:02 +01:00
parent 28fd549808
commit 8b5b96af77

View File

@@ -941,18 +941,18 @@ void PostProcessNetworks(const std::vector<std::shared_ptr<TownNetwork>>& town_n
}
std::vector towns(network->towns);
for (auto town_a : network->towns) {
std::sort(towns.begin(), towns.end(), [&](const TileIndex& a, const TileIndex& b) { return DistanceManhattan(a, town_a) < DistanceManhattan(b, town_a); });
const auto second_clostest_town = *(towns.begin() + 2);
const auto third_clostest_town = *(towns.begin() + 3);
const auto second_closest_town = *(towns.begin() + 2);
const auto third_closest_town = *(towns.begin() + 3);
AyStar finder {};
{
FindPath(finder, town_a, second_clostest_town);
FindPath(finder, town_a, second_closest_town);
finder.Clear();
FindPath(finder, town_a, third_clostest_town);
FindPath(finder, town_a, third_closest_town);
}
finder.Free();