(svn r16907) -Codechange: make a more clear distinction between reservation functions that return a bool and that return TrackBits; GetRailStationReservation vs GetRailwayStationReservation, which one returns the bool and which one the TrackBits?
This commit is contained in:
@@ -88,7 +88,7 @@ static inline TileIndex GetOtherTunnelBridgeEnd(TileIndex t)
|
||||
* @param t the tile
|
||||
* @return reservation state
|
||||
*/
|
||||
static inline bool GetTunnelBridgeReservation(TileIndex t)
|
||||
static inline bool HasTunnelBridgeReservation(TileIndex t)
|
||||
{
|
||||
assert(IsTileType(t, MP_TUNNELBRIDGE));
|
||||
assert(GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL);
|
||||
@@ -114,9 +114,9 @@ static inline void SetTunnelBridgeReservation(TileIndex t, bool b)
|
||||
* @param t the tile
|
||||
* @return reserved track bits
|
||||
*/
|
||||
static inline TrackBits GetRailTunnelBridgeReservation(TileIndex t)
|
||||
static inline TrackBits GetTunnelBridgeReservationTrackBits(TileIndex t)
|
||||
{
|
||||
return GetTunnelBridgeReservation(t) ? DiagDirToDiagTrackBits(GetTunnelBridgeDirection(t)) : TRACK_BIT_NONE;
|
||||
return HasTunnelBridgeReservation(t) ? DiagDirToDiagTrackBits(GetTunnelBridgeDirection(t)) : TRACK_BIT_NONE;
|
||||
}
|
||||
|
||||
#endif /* TUNNELBRIDGE_MAP_H */
|
||||
|
Reference in New Issue
Block a user