1
0
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:
2007-03-21 13:19:01 +00:00
parent a9651a8b8f
commit d7f56f1550
13 changed files with 29 additions and 35 deletions

View File

@@ -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++;
}