summaryrefslogtreecommitdiff
path: root/src/rail_map.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-09-09 12:26:25 +0000
committersmatz <smatz@openttd.org>2008-09-09 12:26:25 +0000
commitf503c7c99e5322ea68336d9fa48c208722df9668 (patch)
tree6bd21c91c8943ef78a3129350c28c9e50daccb89 /src/rail_map.h
parenta527d237aa3af230dd95447916822985ae1c1e11 (diff)
downloadopenttd-f503c7c99e5322ea68336d9fa48c208722df9668.tar.xz
(svn r14280) -Codechange: use IsRailWaypointTile() instead of IsTileType() and IsRailWaypoint() checks at several places
Diffstat (limited to 'src/rail_map.h')
-rw-r--r--src/rail_map.h11
1 files changed, 10 insertions, 1 deletions
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
@@ -83,6 +83,16 @@ static inline bool IsRailWaypoint(TileIndex t)
}
/**
+ * 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
* @pre IsTileType(t, MP_RAILWAY)
@@ -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)