mirror of https://github.com/OpenTTD/OpenTTD
(svn r23580) -Codechange: put the infrastructure maintenance cache testing behind the desync debug level guard, improving the game's speed significantly
parent
4e4a87bd3c
commit
d0e7b0fd9d
|
@ -1119,6 +1119,10 @@ void SwitchToMode(SwitchMode new_mode)
|
||||||
*/
|
*/
|
||||||
static void CheckCaches()
|
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. */
|
/* Check company infrastructure cache. */
|
||||||
SmallVector<CompanyInfrastructure, 4> old_infrastructure;
|
SmallVector<CompanyInfrastructure, 4> old_infrastructure;
|
||||||
Company *c;
|
Company *c;
|
||||||
|
@ -1135,10 +1139,6 @@ static void CheckCaches()
|
||||||
i++;
|
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 */
|
/* Strict checking of the road stop cache entries */
|
||||||
const RoadStop *rs;
|
const RoadStop *rs;
|
||||||
FOR_ALL_ROADSTOPS(rs) {
|
FOR_ALL_ROADSTOPS(rs) {
|
||||||
|
|
Loading…
Reference in New Issue