@@ -88,21 +88,21 @@ static bool CanDetermineTimeTaken(const
static void FillTimetableArrivalDepartureTable(const Vehicle *v, VehicleOrderID start, bool travelling, TimetableArrivalDeparture *table, Ticks offset)
{
assert(table != nullptr);
assert(v->GetNumOrders() >= 2);
assert(start < v->GetNumOrders());
Ticks sum = offset;
VehicleOrderID i = start;
const Order *order = v->GetOrder(i);
/* Pre-initialize with unknown time */
for (int i = 0; i < v->GetNumOrders(); ++i) {
table[i].arrival = table[i].departure = INVALID_TICKS;
}
/* Cyclically loop over all orders until we reach the current one again.
* As we may start at the current order, do a post-checking loop */
do {
/* Automatic orders don't influence the overall timetable;
* they just add some untimetabled entries, but the time till
* the next non-implicit order can still be known. */