From f503c7c99e5322ea68336d9fa48c208722df9668 Mon Sep 17 00:00:00 2001 From: smatz Date: Tue, 9 Sep 2008 12:26:25 +0000 Subject: (svn r14280) -Codechange: use IsRailWaypointTile() instead of IsTileType() and IsRailWaypoint() checks at several places --- src/rail_map.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/rail_map.h') diff --git a/src/rail_map.h b/src/rail_map.h index 0937da730..a6077cf0d 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -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) -- cgit v1.2.3-54-g00ecf