Public roads: Adjust return type of town_network_distance
This commit is contained in:
@@ -1045,10 +1045,10 @@ void GeneratePublicRoads()
|
|||||||
|
|
||||||
IncreaseGeneratingWorldProgress(GWP_PUBLIC_ROADS);
|
IncreaseGeneratingWorldProgress(GWP_PUBLIC_ROADS);
|
||||||
|
|
||||||
auto town_network_distance = [](const TileIndex town, const TownNetwork *network) {
|
auto town_network_distance = [](const TileIndex town, const TownNetwork *network) -> uint {
|
||||||
int32 best = INT32_MAX;
|
uint best = UINT_MAX;
|
||||||
for (TileIndex t : network->towns) {
|
for (TileIndex t : network->towns) {
|
||||||
best = std::min<int32>(best, DistanceManhattan(t, town));
|
best = std::min<uint>(best, DistanceManhattan(t, town));
|
||||||
}
|
}
|
||||||
return best;
|
return best;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user