Improve performance of name sorting in town and station list windows
This commit is contained in:
@@ -232,6 +232,12 @@ void UpdateAllVirtCoords()
|
||||
RebuildViewportKdtree();
|
||||
}
|
||||
|
||||
void ClearAllCachedNames()
|
||||
{
|
||||
ClearAllStationCachedNames();
|
||||
ClearAllTownCachedNames();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialization of the windows and several kinds of caches.
|
||||
* This is not done directly in AfterLoadGame because these
|
||||
@@ -248,6 +254,7 @@ static void InitializeWindowsAndCaches()
|
||||
SetupColoursAndInitialWindow();
|
||||
|
||||
/* Update coordinates of the signs. */
|
||||
ClearAllCachedNames();
|
||||
UpdateAllVirtCoords();
|
||||
ResetViewportAfterLoadGame();
|
||||
|
||||
|
Reference in New Issue
Block a user