(svn r14280) -Codechange: use IsRailWaypointTile() instead of IsTileType() and IsRailWaypoint() checks at several places

This commit is contained in:
smatz
2008-09-09 12:26:25 +00:00
parent a527d237aa
commit f503c7c99e
6 changed files with 17 additions and 12 deletions

View File

@@ -82,6 +82,16 @@ static inline bool IsRailWaypoint(TileIndex t)
return GetRailTileType(t) == RAIL_TILE_WAYPOINT;
}
/**
* Is this tile rail tile and a rail waypoint?
* @param t the tile to get the information from
* @return true if and only if the tile is a rail waypoint
*/
static inline bool IsRailWaypointTile(TileIndex t)
{
return IsTileType(t, MP_RAILWAY) && IsRailWaypoint(t);
}
/**
* Is this rail tile a rail depot?
* @param t the tile to get the information from
@@ -96,7 +106,6 @@ static inline bool IsRailDepot(TileIndex t)
/**
* Is this tile rail tile and a rail depot?
* @param t the tile to get the information from
* @pre IsTileType(t, MP_RAILWAY)
* @return true if and only if the tile is a rail depot
*/
static inline bool IsRailDepotTile(TileIndex t)