Cleanup: Replace FOR_ALL_SORTED_RAILTYPES macro with range iterator.

This commit is contained in:
Peter Nelson
2021-04-28 21:49:58 +01:00
committed by PeterN
parent ae7f07de74
commit 3b3d80c8ef
3 changed files with 5 additions and 15 deletions

View File

@@ -464,10 +464,4 @@ RailType AllocateRailType(RailTypeLabel label);
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++)
#endif /* RAIL_H */