From b0a0086e7cd09d4bd28838fb3aa0fec6b9fc7857 Mon Sep 17 00:00:00 2001 From: celestar Date: Thu, 25 Jan 2007 10:06:58 +0000 Subject: (svn r8402) -Codechange: Move RoadStop-specific enums to the RoadStop class, and changed a one-member enum into a static const. Simplify their naming and add some doxygen-comments to RoadStop --- src/station_map.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/station_map.h') diff --git a/src/station_map.h b/src/station_map.h index c52769b14..460df15f8 100644 --- a/src/station_map.h +++ b/src/station_map.h @@ -75,10 +75,10 @@ typedef enum StationType { StationType GetStationType(TileIndex); -static inline RoadStopType GetRoadStopType(TileIndex t) +static inline RoadStop::Type GetRoadStopType(TileIndex t) { assert(GetStationType(t) == STATION_TRUCK || GetStationType(t) == STATION_BUS); - return GetStationType(t) == STATION_TRUCK ? RS_TRUCK : RS_BUS; + return GetStationType(t) == STATION_TRUCK ? RoadStop::TRUCK : RoadStop::BUS; } static inline StationGfx GetStationGfx(TileIndex t) @@ -275,9 +275,9 @@ static inline void MakeRailStation(TileIndex t, Owner o, StationID sid, Axis a, SetRailType(t, rt); } -static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStopType rst, DiagDirection d) +static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, DiagDirection d) { - MakeStation(t, o, sid, (rst == RS_BUS ? GFX_BUS_BASE : GFX_TRUCK_BASE) + d); + MakeStation(t, o, sid, (rst == RoadStop::BUS ? GFX_BUS_BASE : GFX_TRUCK_BASE) + d); } static inline void MakeAirport(TileIndex t, Owner o, StationID sid, byte section) -- cgit v1.2.3-54-g00ecf