Codechange: do not hide variables with other variables

This commit is contained in:
rubidium42
2023-01-28 20:06:51 +01:00
committed by rubidium42
parent 1951af07c0
commit 6ba55e663e
30 changed files with 137 additions and 146 deletions

View File

@@ -91,15 +91,15 @@ static void FillTimetableArrivalDepartureTable(const Vehicle *v, VehicleOrderID
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 {