MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / ForkChain

Method ForkChain

src/GCodes/GCodeMachineState.cpp:383–387  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
383GCodeMachineState *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

Callers 1

ForkFromMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected