Clone a whole chain of these objects, ensuring that the file positions are correct This is recursive but we don't expect the recursion to be very deep.
| 381 | // Clone a whole chain of these objects, ensuring that the file positions are correct |
| 382 | // This is recursive but we don't expect the recursion to be very deep. |
| 383 | GCodeMachineState *GCodeMachineState::ForkChain() noexcept |
| 384 | { |
| 385 | GCodeMachineState *newPrev = (previous == nullptr) ? nullptr : previous->ForkChain(); |
| 386 | return new GCodeMachineState(*this, newPrev, 0, 1); |
| 387 | } |
| 388 | |
| 389 | #endif |
| 390 |