diff options
author | glx <glx@openttd.org> | 2019-04-12 17:55:35 +0200 |
---|---|---|
committer | glx22 <glx22@users.noreply.github.com> | 2019-04-18 21:49:34 +0200 |
commit | 25e534f3cf42a723f97d6fc08d582329e60a0186 (patch) | |
tree | bad57295db4b3a143ae9866620a1844f67ecbb83 /src/rail.h | |
parent | 0797de06be265da4f3bb06114cae4d8e5c830e71 (diff) | |
download | openttd-25e534f3cf42a723f97d6fc08d582329e60a0186.tar.xz |
Codechange: use std::vector for _sorted_railtypes
Diffstat (limited to 'src/rail.h')
-rw-r--r-- | src/rail.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rail.h b/src/rail.h index 8bfc3f025..8619bac6d 100644 --- a/src/rail.h +++ b/src/rail.h @@ -464,14 +464,13 @@ void ResetRailTypes(); void InitRailTypes(); RailType AllocateRailType(RailTypeLabel label); -extern RailType _sorted_railtypes[RAILTYPE_END]; -extern uint8 _sorted_railtypes_size; +extern std::vector<RailType> _sorted_railtypes; extern RailTypes _railtypes_hidden_mask; /** * Loop header for iterating over railtypes, sorted by sortorder. * @param var Railtype. */ -#define FOR_ALL_SORTED_RAILTYPES(var) for (uint8 index = 0; index < _sorted_railtypes_size && (var = _sorted_railtypes[index], true) ; index++) +#define FOR_ALL_SORTED_RAILTYPES(var) for (uint8 index = 0; index < _sorted_railtypes.size() && (var = _sorted_railtypes[index], true) ; index++) #endif /* RAIL_H */ |