* Inserts a chain into the train at dst. * @param dst the place where to append after. * @param chain the chain to actually add. */
| 922 | * @param chain the chain to actually add. |
| 923 | */ |
| 924 | static void InsertInConsist(Train *dst, Train *chain) |
| 925 | { |
| 926 | /* We do not want to add something in the middle of an articulated part. */ |
| 927 | assert(dst != nullptr && (dst->Next() == nullptr || !dst->Next()->IsArticulatedPart())); |
| 928 | |
| 929 | chain->Last()->SetNext(dst->Next()); |
| 930 | dst->SetNext(chain); |
| 931 | } |
| 932 | |
| 933 | /** |
| 934 | * Normalise the dual heads in the train, i.e. if one is |
no test coverage detected