mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 09:09:09 +00:00
(svn r9388) -Codechange: variable scope and type, and standardify all CargoID loops.
This commit is contained in:
@@ -721,7 +721,7 @@ static void CargoPaymentRatesWndProc(Window *w, WindowEvent *e)
|
||||
gd.x_values_increment = 10;
|
||||
|
||||
uint i = 0;
|
||||
for (CargoID c = 0; c != NUM_CARGO; c++) {
|
||||
for (CargoID c = 0; c < NUM_CARGO; c++) {
|
||||
const CargoSpec *cs = GetCargo(c);
|
||||
if (!cs->IsValid()) continue;
|
||||
|
||||
@@ -791,7 +791,7 @@ void ShowCargoPaymentRates()
|
||||
|
||||
/* Count the number of active cargo types */
|
||||
uint num_active = 0;
|
||||
for (CargoID c = 0; c != NUM_CARGO; c++) {
|
||||
for (CargoID c = 0; c < NUM_CARGO; c++) {
|
||||
if (GetCargo(c)->IsValid()) num_active++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user