Codechange: Cache resolved town, station and industry name strings

This commit is contained in:
Jonathan G Rennison
2020-01-06 20:40:31 +00:00
committed by Charles Pigott
parent f1734e7815
commit c3223903ed
10 changed files with 95 additions and 0 deletions

View File

@@ -222,6 +222,13 @@ void UpdateAllVirtCoords()
RebuildViewportKdtree();
}
void ClearAllCachedNames()
{
ClearAllStationCachedNames();
ClearAllTownCachedNames();
ClearAllIndustryCachedNames();
}
/**
* Initialization of the windows and several kinds of caches.
* This is not done directly in AfterLoadGame because these
@@ -238,6 +245,7 @@ static void InitializeWindowsAndCaches()
SetupColoursAndInitialWindow();
/* Update coordinates of the signs. */
ClearAllCachedNames();
UpdateAllVirtCoords();
ResetViewportAfterLoadGame();