diff options
author | rubidium <rubidium@openttd.org> | 2009-01-03 13:20:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-03 13:20:32 +0000 |
commit | d428da5a356a3d9036b21b502bc90488270cdca9 (patch) | |
tree | e4a2ef1a719a0162a16a31302d400045fa683b38 /src/train_cmd.cpp | |
parent | 18b27692aa76ee620909a70f3152afb474cd6992 (diff) | |
download | openttd-d428da5a356a3d9036b21b502bc90488270cdca9.tar.xz |
(svn r14801) -Codechange: don't reference Vehicle::num_orders directly but through a method GetNumOrders() (PhilSophus)
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index cd085c0d2..e5a2e75f1 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1454,7 +1454,7 @@ CommandCost CmdSellRailWagon(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, /* Copy orders (by sharing) */ new_f->orders = first->orders; - new_f->num_orders = first->num_orders; + new_f->num_orders = first->GetNumOrders(); new_f->AddToShared(first); DeleteVehicleOrders(first); @@ -2360,7 +2360,7 @@ static void CheckNextTrainTile(Vehicle *v) /* Exit if we are on a station tile and are going to stop. */ if (IsRailwayStationTile(v->tile) && v->current_order.ShouldStopAtStation(v, GetStationIndex(v->tile))) return; /* Exit if the current order doesn't have a destination, but the train has orders. */ - if ((v->current_order.IsType(OT_NOTHING) || v->current_order.IsType(OT_LEAVESTATION)) && v->num_orders > 0) return; + if ((v->current_order.IsType(OT_NOTHING) || v->current_order.IsType(OT_LEAVESTATION)) && v->GetNumOrders() > 0) return; Trackdir td = GetVehicleTrackdir(v); @@ -2853,7 +2853,7 @@ public: do { /* Wrap around. */ - if (this->index >= this->v->num_orders) this->index = 0; + if (this->index >= this->v->GetNumOrders()) this->index = 0; Order *order = GetVehicleOrder(this->v, this->index); assert(order != NULL); |