mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 03:53:12 -04:00
perf(memory): Don't even create the data classes for intermediates :)
This commit is contained in:
parent
cbbec40e00
commit
65b96d16ce
@ -652,10 +652,9 @@ object NextTurnAutomation {
|
||||
|
||||
for (civ1city in civ1.cities)
|
||||
for (civ2city in civ2.cities){
|
||||
val currentDistance = CityDistance(civ1city, civ2city,
|
||||
civ1city.getCenterTile().aerialDistanceTo(civ2city.getCenterTile()))
|
||||
if (minDistance == null || currentDistance.aerialDistance < minDistance.aerialDistance)
|
||||
minDistance = currentDistance
|
||||
val currentDistance = civ1city.getCenterTile().aerialDistanceTo(civ2city.getCenterTile())
|
||||
if (minDistance == null || currentDistance < minDistance.aerialDistance)
|
||||
minDistance = CityDistance(civ1city, civ2city, currentDistance)
|
||||
}
|
||||
|
||||
return minDistance
|
||||
|
Loading…
x
Reference in New Issue
Block a user