MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Index

Method Index

src/rail.cpp:26–32  ·  view source on GitHub ↗

* Get the RailType for this RailTypeInfo. * @return RailType in static RailTypeInfo definitions. */

Source from the content-addressed store, hash-verified

24 * @return RailType in static RailTypeInfo definitions.
25 */
26RailType RailTypeInfo::Index() const
27{
28 extern RailTypeInfo _railtypes[RAILTYPE_END];
29 size_t index = this - _railtypes;
30 assert(index < RAILTYPE_END);
31 return static_cast<RailType>(index);
32}
33
34/**
35 * Return the rail type of tile, or INVALID_RAILTYPE if this is no rail tile.

Callers 1

GetRailTypeByLabelFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected