From bbf4f982a09d7fdcfab9633260dcce4ec8bfae4c Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 30 Mar 2006 09:29:01 +0000 Subject: (svn r4166) Sprinkle several map accessors with assert()s --- tunnel_map.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tunnel_map.h') diff --git a/tunnel_map.h b/tunnel_map.h index 6ac6cb44b..67c1fa94f 100644 --- a/tunnel_map.h +++ b/tunnel_map.h @@ -11,6 +11,7 @@ static inline bool IsTunnel(TileIndex t) { + assert(IsTileType(t, MP_TUNNELBRIDGE)); return !HASBIT(_m[t].m5, 7); } @@ -23,12 +24,14 @@ static inline bool IsTunnelTile(TileIndex t) static inline DiagDirection GetTunnelDirection(TileIndex t) { + assert(IsTunnelTile(t)); return (DiagDirection)GB(_m[t].m5, 0, 2); } static inline TransportType GetTunnelTransportType(TileIndex t) { + assert(IsTunnelTile(t)); return (TransportType)GB(_m[t].m5, 2, 2); } -- cgit v1.2.3-54-g00ecf