(svn r16852) -Codechange: use FOR_ALL_CARGOSPECS for iterating over all valid CargoSpecs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user