summaryrefslogtreecommitdiff
path: root/src/saveload
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/saveload
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/saveload')
-rw-r--r--src/saveload/waypoint_sl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/saveload/waypoint_sl.cpp b/src/saveload/waypoint_sl.cpp
index 9d1f164b4..6ea72ea6f 100644
--- a/src/saveload/waypoint_sl.cpp
+++ b/src/saveload/waypoint_sl.cpp
@@ -76,15 +76,16 @@ void MoveWaypointsToBaseStations()
_m[wp->xy].m2 = (StationID)wp->index;
if (HasBit(_m[wp->xy].m3, 4)) {
- wp->spec = StationClass::Get(STAT_CLASS_WAYP, _m[wp->xy].m4 + 1);
+ wp->spec = StationClass::Get(STAT_CLASS_WAYP)->GetSpec(_m[wp->xy].m4 + 1);
}
}
} else {
/* As of version 17, we recalculate the custom graphic ID of waypoints
* from the GRF ID / station index. */
for (OldWaypoint *wp = _old_waypoints.Begin(); wp != _old_waypoints.End(); wp++) {
- for (uint i = 0; i < StationClass::GetCount(STAT_CLASS_WAYP); i++) {
- const StationSpec *statspec = StationClass::Get(STAT_CLASS_WAYP, i);
+ StationClass* stclass = StationClass::Get(STAT_CLASS_WAYP);
+ for (uint i = 0; i < stclass->GetSpecCount(); i++) {
+ const StationSpec *statspec = stclass->GetSpec(i);
if (statspec != NULL && statspec->grf_prop.grffile->grfid == wp->grfid && statspec->grf_prop.local_id == wp->localidx) {
wp->spec = statspec;
break;