summaryrefslogtreecommitdiff
path: root/src/train.h
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/train.h
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/train.h')
-rw-r--r--src/train.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/train.h b/src/train.h
index 1983b99ff..55ef18663 100644
--- a/src/train.h
+++ b/src/train.h
@@ -200,7 +200,7 @@ static inline void ClearMultiheaded(Vehicle *v)
static inline bool EngineHasArticPart(const Vehicle *v)
{
assert(v->type == VEH_TRAIN);
- return (v->next != NULL && IsArticulatedPart(v->next));
+ return (v->Next() != NULL && IsArticulatedPart(v->Next()));
}
/**
@@ -211,7 +211,7 @@ static inline bool EngineHasArticPart(const Vehicle *v)
static inline Vehicle *GetNextArticPart(const Vehicle *v)
{
assert(EngineHasArticPart(v));
- return v->next;
+ return v->Next();
}
/** Get the last part of a multi-part engine.
@@ -235,7 +235,7 @@ static inline Vehicle *GetNextVehicle(const Vehicle *v)
while (EngineHasArticPart(v)) v = GetNextArticPart(v);
/* v now contains the last artic part in the engine */
- return v->next;
+ return v->Next();
}
void ConvertOldMultiheadToNew();