16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 02:09:19 +02:00

Replace starts_with and ends_with with string class methods

This commit is contained in:
docentYT
2026-05-01 17:31:11 +02:00
parent 9c27b54960
commit ec1dfae953
15 changed files with 29 additions and 50 deletions

View File

@@ -29,9 +29,7 @@ basic_station::update_load( TDynamicObject *First, Mtable::TTrainParameters &Sch
// HACK: determine whether current station is a (small) stop from the presence of "po" at the name end
auto const stationname { Schedule.TimeTable[ Schedule.StationIndex ].StationName };
auto const stationequipment { Schedule.TimeTable[ Schedule.StationIndex ].StationWare };
auto const trainstop { (
( ends_with( stationname, "po" ) )
|| ( contains( stationequipment, "po" ) ) ) };
auto const trainstop {stationname.ends_with("po") || contains( stationequipment, "po" ) };
auto const maintenancestop { ( contains( stationequipment, "pt" ) ) };
// train stops exchange smaller groups than regular stations
// NOTE: this is crude and unaccurate, but for now will do