(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.

This commit is contained in:
rubidium
2007-08-30 20:40:33 +00:00
parent d4290086e8
commit 5ff81aca18
12 changed files with 23 additions and 47 deletions

View File

@@ -30,7 +30,7 @@ struct Waypoint : PoolItem<Waypoint, WaypointID, &_Waypoint_pool> {
Waypoint(TileIndex tile = 0);
~Waypoint();
bool IsValid() const;
inline bool IsValid() const { return this->xy != 0; }
};
static inline bool IsValidWaypointID(WaypointID index)