diff options
author | terkhen <terkhen@openttd.org> | 2010-04-02 12:20:41 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-04-02 12:20:41 +0000 |
commit | 8660890bbb82638dcb81f713047aa3e16ad82cf4 (patch) | |
tree | 063f78c516c6e1b24d983ec760b91f16e97f6fb1 /src/cargotype.h | |
parent | 316384a26f5fd3d9e22a004ba801a3744a6b1cc6 (diff) | |
download | openttd-8660890bbb82638dcb81f713047aa3e16ad82cf4.tar.xz |
(svn r19539) -Codechange: Use a macro to loop through the list of sorted cargo specifications.
Diffstat (limited to 'src/cargotype.h')
-rw-r--r-- | src/cargotype.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cargotype.h b/src/cargotype.h index c0d552a5d..4ce5e60f6 100644 --- a/src/cargotype.h +++ b/src/cargotype.h @@ -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 */ |