Cleanup: Replace FOR_ALL_SORTED_RAILTYPES macro with range iterator.

(cherry picked from commit 3b3d80c8ef)
This commit is contained in:
Peter Nelson
2021-04-28 21:49:58 +01:00
committed by Jonathan G Rennison
parent a4821e2732
commit 571f807b20
3 changed files with 5 additions and 15 deletions

View File

@@ -497,12 +497,6 @@ 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++)
/** Enum holding the signal offset in the sprite sheet according to the side it is representing. */
enum SignalOffsets {
SIGNAL_TO_SOUTHWEST,