diff options
author | rubidium <rubidium@openttd.org> | 2007-08-30 13:03:56 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-30 13:03:56 +0000 |
commit | cb7eaff3534c1d18c9c8bc06be04ceb437d97765 (patch) | |
tree | 141633b357757cb790c904dc033f8479d58ba5e5 /src/depot_gui.cpp | |
parent | ac5fde61fb03059daee4b505dcaad84f21b93857 (diff) | |
download | openttd-cb7eaff3534c1d18c9c8bc06be04ceb437d97765.tar.xz |
(svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that.
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r-- | src/depot_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 7f47d54d0..0ca889b78 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -279,7 +279,7 @@ static void DrawDepotWindow(Window *w) /*Draw the train counter */ i = 0; u = v; - do i++; while ( (u=u->next) != NULL); // Determine length of train + do i++; while ((u = u->Next()) != NULL); // Determine length of train SetDParam(0, i); // Set the counter DrawStringRightAligned(w->widget[DEPOT_WIDGET_MATRIX].right - 1, y + 4, STR_TINY_BLACK, 0); // Draw the counter } @@ -356,7 +356,7 @@ static int GetVehicleFromDepotWndPt(const Window *w, int x, int y, Vehicle **veh x += skip; /* find the vehicle in this row that was clicked */ - while (v != NULL && (x -= v->u.rail.cached_veh_length) >= 0) v = v->next; + while (v != NULL && (x -= v->u.rail.cached_veh_length) >= 0) v = v->Next(); /* if an articulated part was selected, find its parent */ while (v != NULL && IsArticulatedPart(v)) v = GetPrevVehicleInChain(v); |