diff options
author | Jonathan G Rennison <j.g.rennison@gmail.com> | 2020-01-06 20:40:31 +0000 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2020-01-12 19:37:43 +0000 |
commit | c3223903ed4f39abe8589355882b30b973da434e (patch) | |
tree | 9876dda172d7a076d7724efc52e21302bb7696a7 /src/saveload | |
parent | f1734e7815653829d42ebd4def8c0d7d5aeae986 (diff) | |
download | openttd-c3223903ed4f39abe8589355882b30b973da434e.tar.xz |
Codechange: Cache resolved town, station and industry name strings
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/afterload.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index c37c297c5..022fd28e9 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -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(); |