Mercurial > hg > openttd
changeset 18732:2878ba8fde47 draft
(svn r23580) -Codechange: put the infrastructure maintenance cache testing behind the desync debug level guard, improving the game's speed significantly
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 17 Dec 2011 21:20:41 +0000 |
parents | df35e3840acf |
children | 0ccac256adb9 |
files | src/openttd.cpp |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1119,6 +1119,10 @@ */ static void CheckCaches() { + /* Return here so it is easy to add checks that are run + * always to aid testing of caches. */ + if (_debug_desync_level <= 1) return; + /* Check company infrastructure cache. */ SmallVector<CompanyInfrastructure, 4> old_infrastructure; Company *c; @@ -1135,10 +1139,6 @@ i++; } - /* Return here so it is easy to add checks that are run - * always to aid testing of caches. */ - if (_debug_desync_level <= 1) return; - /* Strict checking of the road stop cache entries */ const RoadStop *rs; FOR_ALL_ROADSTOPS(rs) {