1
0
Fork 0

Codechange: strongly type RoadStopID

pull/13511/head
Rubidium 2025-02-01 02:47:31 +01:00 committed by rubidium42
parent d10499f2f1
commit f9f19de8c2
2 changed files with 3 additions and 2 deletions

View File

@ -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 */

View File

@ -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;