From 5ff81aca1873824af8b00eeb74ddedfce9dfef4a Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 30 Aug 2007 20:40:33 +0000 Subject: (svn r11009) -Codechange: unvirtualise IsValid as that isn't needed with templates. This gives up to 10% performance increase in games with lots of vehicles. --- src/engine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/engine.h') diff --git a/src/engine.h b/src/engine.h index 6ee7d18c4..1ef09d3db 100644 --- a/src/engine.h +++ b/src/engine.h @@ -284,7 +284,7 @@ struct EngineRenew : PoolItem { EngineRenew(EngineID from = INVALID_ENGINE, EngineID to = INVALID_ENGINE) : from(from), to(to), next(NULL) {} ~EngineRenew() { this->from = INVALID_ENGINE; } - bool IsValid() const { return this->from != INVALID_ENGINE; } + inline bool IsValid() const { return this->from != INVALID_ENGINE; } }; #define FOR_ALL_ENGINE_RENEWS_FROM(er, start) for (er = GetEngineRenew(start); er != NULL; er = (er->index + 1U < GetEngineRenewPoolSize()) ? GetEngineRenew(er->index + 1U) : NULL) if (er->IsValid()) -- cgit v1.2.3-70-g09d2