(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 9833639b00
commit 8a6cc3aa10
12 changed files with 23 additions and 47 deletions

View File

@@ -237,14 +237,6 @@ bool Station::IsBuoy() const
return (had_vehicle_of_type & HVOT_BUOY) != 0;
}
/** Determines whether a station exists
* @todo replace 0 by INVALID_TILE
*/
bool Station::IsValid() const
{
return xy != 0;
}
/************************************************************************/
/* StationRect implementation */
@@ -437,12 +429,6 @@ RoadStop::~RoadStop()
xy = 0;
}
/** Determines whether a RoadStop is a valid (i.e. existing) one */
bool RoadStop::IsValid() const
{
return xy != 0;
}
/** Checks whether there is a free bay in this road stop */
bool RoadStop::HasFreeBay() const
{