(svn r16852) -Codechange: use FOR_ALL_CARGOSPECS for iterating over all valid CargoSpecs

This commit is contained in:
smatz
2009-07-16 20:40:06 +00:00
parent 665fa7f9c1
commit 77d13eae61
11 changed files with 100 additions and 86 deletions

View File

@@ -832,10 +832,9 @@ void ResetEconomy()
/* Test if resetting the economy is needed. */
bool needed = false;
for (CargoID c = 0; c < NUM_CARGO; c++) {
const CargoSpec *cs = CargoSpec::Get(c);
if (!cs->IsValid()) continue;
if (_cargo_payment_rates[c] == 0) {
const CargoSpec *cs;
FOR_ALL_CARGOSPECS(cs) {
if (_cargo_payment_rates[cs->Index()] == 0) {
needed = true;
break;
}