(svn r16711) -Codechange: use FOR_ALL_SUBSIDIES macro when iterating over all subsidies

This commit is contained in:
smatz
2009-07-01 17:43:26 +00:00
parent 023f78b5ff
commit f4d0d94184
7 changed files with 37 additions and 42 deletions

View File

@@ -1916,8 +1916,8 @@ bool AfterLoadGame()
}
/* Delete invalid subsidies possibly present in old versions (but converted to new savegame) */
for (Subsidy *s = _subsidies; s < endof(_subsidies); s++) {
if (s->cargo_type == CT_INVALID) continue;
Subsidy *s;
FOR_ALL_SUBSIDIES(s) {
if (s->age >= 12) {
/* Station -> Station */
const Station *from = Station::GetIfValid(s->from);