diff options
author | frosch <frosch@openttd.org> | 2010-04-17 13:31:41 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-04-17 13:31:41 +0000 |
commit | 75d4bc947ddbb92ecf660d9a9858c854d5e34a15 (patch) | |
tree | b218a672a78b894388373d2e700e6ad6ebe75b63 /src/waypoint_cmd.cpp | |
parent | 184fa43df2e14c73162e641bc9bc83e403f069ed (diff) | |
download | openttd-75d4bc947ddbb92ecf660d9a9858c854d5e34a15.tar.xz |
(svn r19654) -Codechange: Use Extract<> in more places.
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r-- | src/waypoint_cmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index 8771f27aa..5e8ce29bd 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -11,6 +11,7 @@ #include "stdafx.h" +#include "cmd_helper.h" #include "command_func.h" #include "landscape.h" #include "bridge_map.h" @@ -215,12 +216,12 @@ extern CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta, CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { /* Unpack parameters */ - Axis axis = (Axis)GB(p1, 4, 1); + Axis axis = Extract<Axis, 4, 1>(p1); byte width = GB(p1, 8, 8); byte height = GB(p1, 16, 8); bool adjacent = HasBit(p1, 24); - StationClassID spec_class = (StationClassID)GB(p2, 0, 8); + StationClassID spec_class = Extract<StationClassID, 0, 8>(p2); byte spec_index = GB(p2, 8, 8); StationID station_to_join = GB(p2, 16, 16); |