Push state returning true if successful (i.e. stack not overflowed)
| 1019 | |
| 1020 | // Push state returning true if successful (i.e. stack not overflowed) |
| 1021 | bool GCodeBuffer::PushState(bool withinSameFile) noexcept |
| 1022 | { |
| 1023 | // Check the current stack depth |
| 1024 | if (GetStackDepth() >= MaxStackDepth) |
| 1025 | { |
| 1026 | return false; |
| 1027 | } |
| 1028 | |
| 1029 | machineState = new GCodeMachineState(*machineState, withinSameFile); |
| 1030 | reprap.InputsUpdated(); |
| 1031 | return true; |
| 1032 | } |
| 1033 | |
| 1034 | // Pop state returning true if successful (i.e. no stack underrun) |
| 1035 | bool GCodeBuffer::PopState(bool withinSameFile) noexcept |