summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2011-02-10 18:27:50 +0000
committerterkhen <terkhen@openttd.org>2011-02-10 18:27:50 +0000
commit096c2857ee5e7cc8965812fa9f060eb9bc80e604 (patch)
tree247a1ce0ad93592f7114809fa5a28e3edd6103da /src
parent16dd93d3fbb42141e7d24f14b928ba7579980347 (diff)
downloadopenttd-096c2857ee5e7cc8965812fa9f060eb9bc80e604.tar.xz
(svn r22049) -Codechange: Add assert condition to GetRoadOwner.
Diffstat (limited to 'src')
-rw-r--r--src/road_map.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/road_map.h b/src/road_map.h
index 01daba8e7..62f125dbb 100644
--- a/src/road_map.h
+++ b/src/road_map.h
@@ -198,6 +198,7 @@ static inline bool HasTileRoadType(TileIndex t, RoadType rt)
*/
static inline Owner GetRoadOwner(TileIndex t, RoadType rt)
{
+ assert(IsTileType(t, MP_ROAD) || IsTileType(t, MP_STATION) || IsTileType(t, MP_TUNNELBRIDGE));
switch (rt) {
default: NOT_REACHED();
case ROADTYPE_ROAD: return (Owner)GB(IsNormalRoadTile(t) ? _m[t].m1 : _me[t].m7, 0, 5);