Return the current stack depth
| 1008 | |
| 1009 | // Return the current stack depth |
| 1010 | unsigned int GCodeBuffer::GetStackDepth() const noexcept |
| 1011 | { |
| 1012 | unsigned int depth = 0; |
| 1013 | for (const GCodeMachineState *_ecv_null m1 = machineState; m1->GetPrevious() != nullptr; m1 = m1->GetPrevious()) |
| 1014 | { |
| 1015 | ++depth; |
| 1016 | } |
| 1017 | return depth; |
| 1018 | } |
| 1019 | |
| 1020 | // Push state returning true if successful (i.e. stack not overflowed) |
| 1021 | bool GCodeBuffer::PushState(bool withinSameFile) noexcept |
no test coverage detected