* Get the RoadType for this RoadTypeInfo. * @return RoadType in static RoadTypeInfo definitions. */
| 28 | * @return RoadType in static RoadTypeInfo definitions. |
| 29 | */ |
| 30 | RoadType RoadTypeInfo::Index() const |
| 31 | { |
| 32 | extern RoadTypeInfo _roadtypes[ROADTYPE_END]; |
| 33 | size_t index = this - _roadtypes; |
| 34 | assert(index < ROADTYPE_END); |
| 35 | return static_cast<RoadType>(index); |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Return if the tile is a valid tile for a crossing. |
no outgoing calls
no test coverage detected