(svn r19539) -Codechange: Use a macro to loop through the list of sorted cargo specifications.

This commit is contained in:
terkhen
2010-04-02 12:20:41 +00:00
parent 316384a26f
commit 8660890bbb
3 changed files with 17 additions and 9 deletions

View File

@@ -149,4 +149,6 @@ static inline bool IsCargoInClass(CargoID c, CargoClass cc)
if ((var = CargoSpec::Get(cargospec_index))->IsValid())
#define FOR_ALL_CARGOSPECS(var) FOR_ALL_CARGOSPECS_FROM(var, 0)
#define FOR_ALL_SORTED_CARGOSPECS(var) for (uint8 index = 0; var = _sorted_cargo_specs[index], index < _sorted_cargo_specs_size; index++)
#endif /* CARGOTYPE_H */