diff options
author | rubidium <rubidium@openttd.org> | 2010-05-11 21:01:57 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-05-11 21:01:57 +0000 |
commit | fe71d4fc99aa74c504de0ce3c80cb318903bddf7 (patch) | |
tree | a341ee7052894b7f161a41c435038c625c9f5837 /src/road_func.h | |
parent | d2364c32edd064dd014b9126029ad70673e48ba3 (diff) | |
download | openttd-fe71d4fc99aa74c504de0ce3c80cb318903bddf7.tar.xz |
(svn r19791) -Change: use the typed FOR_EACH_SET_BIT for RoadTypes (adf88)
Diffstat (limited to 'src/road_func.h')
-rw-r--r-- | src/road_func.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/road_func.h b/src/road_func.h index 7303ebff3..4a49d4601 100644 --- a/src/road_func.h +++ b/src/road_func.h @@ -19,6 +19,17 @@ #include "tile_type.h" /** + * Iterate through each set RoadType in a RoadTypes value. + * For more informations see FOR_EACH_SET_BIT_EX. + * + * @param var Loop index variable that stores fallowing set road type. Must be of type RoadType. + * @param road_types The value to iterate through (any expression). + * + * @see FOR_EACH_SET_BIT_EX + */ +#define FOR_EACH_SET_ROADTYPE(var, road_types) FOR_EACH_SET_BIT_EX(RoadType, var, RoadTypes, road_types) + +/** * Whether the given roadtype is valid. * @param rt the roadtype to check for validness * @return true if and only if valid |