Fix: Set up default station/waypoint classes properly. (#10789)
This commit is contained in:
@@ -31,13 +31,10 @@ template <typename Tspec, typename Tid, Tid Tmax>
|
|||||||
void NewGRFClass<Tspec, Tid, Tmax>::InsertDefaults()
|
void NewGRFClass<Tspec, Tid, Tmax>::InsertDefaults()
|
||||||
{
|
{
|
||||||
/* Set up initial data */
|
/* Set up initial data */
|
||||||
classes[0].global_id = 'DFLT';
|
RoadStopClass::Get(RoadStopClass::Allocate('DFLT'))->name = STR_STATION_CLASS_DFLT;
|
||||||
classes[0].name = STR_STATION_CLASS_DFLT;
|
RoadStopClass::Get(RoadStopClass::Allocate('DFLT'))->Insert(nullptr);
|
||||||
classes[0].Insert(nullptr);
|
RoadStopClass::Get(RoadStopClass::Allocate('WAYP'))->name = STR_STATION_CLASS_WAYP;
|
||||||
|
RoadStopClass::Get(RoadStopClass::Allocate('WAYP'))->Insert(nullptr);
|
||||||
classes[1].global_id = 'WAYP';
|
|
||||||
classes[1].name = STR_STATION_CLASS_WAYP;
|
|
||||||
classes[1].Insert(nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Tspec, typename Tid, Tid Tmax>
|
template <typename Tspec, typename Tid, Tid Tmax>
|
||||||
|
|||||||
@@ -32,13 +32,10 @@ template <typename Tspec, typename Tid, Tid Tmax>
|
|||||||
/* static */ void NewGRFClass<Tspec, Tid, Tmax>::InsertDefaults()
|
/* static */ void NewGRFClass<Tspec, Tid, Tmax>::InsertDefaults()
|
||||||
{
|
{
|
||||||
/* Set up initial data */
|
/* Set up initial data */
|
||||||
classes[0].global_id = 'DFLT';
|
StationClass::Get(StationClass::Allocate('DFLT'))->name = STR_STATION_CLASS_DFLT;
|
||||||
classes[0].name = STR_STATION_CLASS_DFLT;
|
StationClass::Get(StationClass::Allocate('DFLT'))->Insert(nullptr);
|
||||||
classes[0].Insert(nullptr);
|
StationClass::Get(StationClass::Allocate('WAYP'))->name = STR_STATION_CLASS_WAYP;
|
||||||
|
StationClass::Get(StationClass::Allocate('WAYP'))->Insert(nullptr);
|
||||||
classes[1].global_id = 'WAYP';
|
|
||||||
classes[1].name = STR_STATION_CLASS_WAYP;
|
|
||||||
classes[1].Insert(nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Tspec, typename Tid, Tid Tmax>
|
template <typename Tspec, typename Tid, Tid Tmax>
|
||||||
|
|||||||
Reference in New Issue
Block a user