Fix: O(N^2) cost of Station::RecomputeCatchmentForAll

Station::RemoveFromAllNearbyLists does not need to be called when
all station nearby lists have been cleared and are being regenerated.
This commit is contained in:
Jonathan G Rennison
2019-09-23 18:45:37 +01:00
committed by rubidium42
parent 5d0ad5625b
commit 0e4b716815
2 changed files with 7 additions and 4 deletions

View File

@@ -501,7 +501,7 @@ public:
uint GetPlatformLength(TileIndex tile, DiagDirection dir) const override;
uint GetPlatformLength(TileIndex tile) const override;
void RecomputeCatchment();
void RecomputeCatchment(bool no_clear_nearby_lists = false);
static void RecomputeCatchmentForAll();
uint GetCatchmentRadius() const;