summaryrefslogtreecommitdiff
path: root/src/waypoint_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-04-22 16:28:14 +0000
committerfrosch <frosch@openttd.org>2012-04-22 16:28:14 +0000
commit0f0e7e43cf09c0ff82e4119b08956670160aaa58 (patch)
tree73eac59bde99d2517e2766ada36995fe7952d2d3 /src/waypoint_cmd.cpp
parentcb434944885d5e5caa857deb3273712c4c223031 (diff)
downloadopenttd-0f0e7e43cf09c0ff82e4119b08956670160aaa58.tar.xz
(svn r24166) -Codechange: Turn NewGRFClass::Get(Tid, uint) and GetCount(Tid) into non-static members GetSpec(uint) and GetSpecCount().
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r--src/waypoint_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp
index 74648ae14..35d7745c7 100644
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -170,7 +170,7 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint
/* Check if the given station class is valid */
if (spec_class != STAT_CLASS_WAYP) return CMD_ERROR;
- if (spec_index >= StationClass::GetCount(spec_class)) return CMD_ERROR;
+ if (spec_index >= StationClass::Get(spec_class)->GetSpecCount()) return CMD_ERROR;
/* The number of parts to build */
byte count = axis == AXIS_X ? height : width;
@@ -242,7 +242,7 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint
wp->UpdateVirtCoord();
- const StationSpec *spec = StationClass::Get(spec_class, spec_index);
+ const StationSpec *spec = StationClass::Get(spec_class)->GetSpec(spec_index);
byte *layout_ptr = AllocaM(byte, count);
if (spec == NULL) {
/* The layout must be 0 for the 'normal' waypoints by design. */