Change various asserts to not be included in release builds
This commit is contained in:
@@ -24,7 +24,7 @@ static const TunnelID TUNNEL_ID_MAP_LOOKUP = 0xFFFF; ///< Sentinel ID value to s
|
||||
*/
|
||||
static inline bool IsTunnel(TileIndex t)
|
||||
{
|
||||
assert_tile(IsTileType(t, MP_TUNNELBRIDGE), t);
|
||||
dbg_assert_tile(IsTileType(t, MP_TUNNELBRIDGE), t);
|
||||
return !HasBit(_m[t].m5, 7);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ static inline TunnelID GetTunnelIndex(TileIndex t)
|
||||
{
|
||||
extern TunnelID GetTunnelIndexByLookup(TileIndex t);
|
||||
|
||||
assert_tile(IsTunnelTile(t), t);
|
||||
dbg_assert_tile(IsTunnelTile(t), t);
|
||||
TunnelID map_id = _m[t].m2;
|
||||
return map_id == TUNNEL_ID_MAP_LOOKUP ? GetTunnelIndexByLookup(t) : map_id;
|
||||
}
|
||||
@@ -71,7 +71,7 @@ static inline bool IsRailTunnelTile(TileIndex t)
|
||||
*/
|
||||
static inline bool HasTunnelReservation(TileIndex t)
|
||||
{
|
||||
assert_tile(IsRailTunnelTile(t), t);
|
||||
dbg_assert_tile(IsRailTunnelTile(t), t);
|
||||
return HasBit(_m[t].m5, 4);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ static inline bool HasTunnelReservation(TileIndex t)
|
||||
*/
|
||||
static inline void SetTunnelReservation(TileIndex t, bool b)
|
||||
{
|
||||
assert_tile(IsRailTunnelTile(t), t);
|
||||
dbg_assert_tile(IsRailTunnelTile(t), t);
|
||||
SB(_m[t].m5, 4, 1, b ? 1 : 0);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ bool IsTunnelInWay(TileIndex, int z, IsTunnelInWayFlags flags = ITIWF_NONE);
|
||||
*/
|
||||
static inline void SetTunnelIndex(TileIndex t, TunnelID id)
|
||||
{
|
||||
assert_tile(IsTunnelTile(t), t);
|
||||
dbg_assert_tile(IsTunnelTile(t), t);
|
||||
_m[t].m2 = (id >= TUNNEL_ID_MAP_LOOKUP) ? TUNNEL_ID_MAP_LOOKUP : id;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user