File diff r26828:fa6e2fa4b68c → r26829:f1ebd010c392
src/timetable_gui.cpp
Show inline comments
 
@@ -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;
 
	}
 

	
 
	Ticks sum = offset;
 
	VehicleOrderID i = start;
 
	const Order *order = v->GetOrder(i);
 

	
 
	/* 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. */