diff options
author | rubidium <rubidium@openttd.org> | 2011-12-17 21:20:41 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-12-17 21:20:41 +0000 |
commit | d0e7b0fd9df6fda297bbfdc9037e730143fe2efc (patch) | |
tree | 53c428d0f7e6eeae0cf17bec0ade00dfff71fb92 /src | |
parent | 4e4a87bd3c15da581b82549cd38451df20e7687d (diff) | |
download | openttd-d0e7b0fd9df6fda297bbfdc9037e730143fe2efc.tar.xz |
(svn r23580) -Codechange: put the infrastructure maintenance cache testing behind the desync debug level guard, improving the game's speed significantly
Diffstat (limited to 'src')
-rw-r--r-- | src/openttd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index f6b00e421..5745fadee 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1119,6 +1119,10 @@ void SwitchToMode(SwitchMode new_mode) */ 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 @@ static void CheckCaches() 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) { |