From 235ad4ab6bf3133517a7a779c398e30f51bdbbad Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 30 Aug 2007 13:03:56 +0000 Subject: (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. --- src/train.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/train.h') 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(); -- cgit v1.2.3-54-g00ecf