summaryrefslogtreecommitdiff
path: root/src/roadveh_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-30 13:03:56 +0000
committerrubidium <rubidium@openttd.org>2007-08-30 13:03:56 +0000
commitcb7eaff3534c1d18c9c8bc06be04ceb437d97765 (patch)
tree141633b357757cb790c904dc033f8479d58ba5e5 /src/roadveh_gui.cpp
parentac5fde61fb03059daee4b505dcaad84f21b93857 (diff)
downloadopenttd-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/roadveh_gui.cpp')
-rw-r--r--src/roadveh_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp
index f67d81e02..331053605 100644
--- a/src/roadveh_gui.cpp
+++ b/src/roadveh_gui.cpp
@@ -46,7 +46,7 @@ void DrawRoadVehImage(const Vehicle *v, int x, int y, int count, VehicleID selec
}
dx += length;
- v = v->next;
+ v = v->Next();
} while (v != NULL && dx < max_length);
}
@@ -65,7 +65,7 @@ static void RoadVehDetailsWndProc(Window *w, WindowEvent *e)
/* Add space for the cargo amount for each part. */
do {
height_extension += 11;
- } while ((v = v->next) != NULL);
+ } while ((v = v->Next()) != NULL);
ResizeWindow(w, 0, height_extension);
} break;
@@ -128,7 +128,7 @@ static void RoadVehDetailsWndProc(Window *w, WindowEvent *e)
memset(max_cargo, 0, sizeof(max_cargo));
- for (const Vehicle *u = v; u != NULL; u = u->next) {
+ for (const Vehicle *u = v; u != NULL; u = u->Next()) {
max_cargo[u->cargo_type] += u->cargo_cap;
}
@@ -153,7 +153,7 @@ static void RoadVehDetailsWndProc(Window *w, WindowEvent *e)
SetDParamStr(0, capacity);
DrawStringTruncated(34, 67 + y_offset, STR_JUST_STRING, 0, w->width - 34);
- for (const Vehicle *u = v; u != NULL; u = u->next) {
+ for (const Vehicle *u = v; u != NULL; u = u->Next()) {
str = STR_8812_EMPTY;
if (!u->cargo.Empty()) {
SetDParam(0, u->cargo_type);