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

Function MakeTrainBackup

src/train_cmd.cpp:875–878  ·  view source on GitHub ↗

* Make a backup of a train into a train list. * @param list to make the backup in * @param t the train to make the backup of */

Source from the content-addressed store, hash-verified

873 * @param t the train to make the backup of
874 */
875static void MakeTrainBackup(TrainList &list, Train *t)
876{
877 for (; t != nullptr; t = t->Next()) list.push_back(t);
878}
879
880/**
881 * Restore the train from the backup list.

Callers 2

CmdMoveRailVehicleFunction · 0.85
CmdSellRailWagonFunction · 0.85

Calls 2

push_backMethod · 0.80
NextMethod · 0.45

Tested by

no test coverage detected