(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:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user