Codechange: use std::vector for _sorted_railtypes
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user