mirror of https://github.com/OpenTTD/OpenTTD
Codechange: strongly type RoadStopID
parent
d10499f2f1
commit
f9f19de8c2
|
@ -15,7 +15,7 @@
|
||||||
#include "core/bitmath_func.hpp"
|
#include "core/bitmath_func.hpp"
|
||||||
#include "vehicle_type.h"
|
#include "vehicle_type.h"
|
||||||
|
|
||||||
typedef Pool<RoadStop, RoadStopID, 32, 64000> RoadStopPool;
|
using RoadStopPool = Pool<RoadStop, RoadStopID, 32, RoadStopID::End().base()>;
|
||||||
extern RoadStopPool _roadstop_pool;
|
extern RoadStopPool _roadstop_pool;
|
||||||
|
|
||||||
/** A Stop for a Road Vehicle */
|
/** A Stop for a Road Vehicle */
|
||||||
|
|
|
@ -10,11 +10,12 @@
|
||||||
#ifndef STATION_TYPE_H
|
#ifndef STATION_TYPE_H
|
||||||
#define STATION_TYPE_H
|
#define STATION_TYPE_H
|
||||||
|
|
||||||
|
#include "core/pool_type.hpp"
|
||||||
#include "core/smallstack_type.hpp"
|
#include "core/smallstack_type.hpp"
|
||||||
#include "tilearea_type.h"
|
#include "tilearea_type.h"
|
||||||
|
|
||||||
typedef uint16_t StationID;
|
typedef uint16_t StationID;
|
||||||
typedef uint16_t RoadStopID;
|
using RoadStopID = PoolID<uint16_t, struct RoadStopIDTag, 64000, 0xFFFF>;
|
||||||
|
|
||||||
struct BaseStation;
|
struct BaseStation;
|
||||||
struct Station;
|
struct Station;
|
||||||
|
|
Loading…
Reference in New Issue