From cb7eaff3534c1d18c9c8bc06be04ceb437d97765 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/group_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/group_cmd.cpp') diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index 3ac42e2fd..f27473640 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -371,7 +371,7 @@ void SetTrainGroupID(Vehicle *v, GroupID new_g) assert(v->IsValid() && v->type == VEH_TRAIN && IsFrontEngine(v)); - for (Vehicle *u = v; u != NULL; u = u->next) { + for (Vehicle *u = v; u != NULL; u = u->Next()) { if (IsEngineCountable(u)) UpdateNumEngineGroup(u->engine_type, u->group_id, new_g); u->group_id = new_g; @@ -394,7 +394,7 @@ void UpdateTrainGroupID(Vehicle *v) assert(v->IsValid() && v->type == VEH_TRAIN && (IsFrontEngine(v) || IsFreeWagon(v))); GroupID new_g = IsFrontEngine(v) ? v->group_id : (GroupID)DEFAULT_GROUP; - for (Vehicle *u = v; u != NULL; u = u->next) { + for (Vehicle *u = v; u != NULL; u = u->Next()) { if (IsEngineCountable(u)) UpdateNumEngineGroup(u->engine_type, u->group_id, new_g); u->group_id = new_g; -- cgit v1.2.3-54-g00ecf