diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-01-04 21:15:22 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-01-04 21:15:22 +0300 |
commit | 5bd28a1aea25e83e6e1d7a0ca50cd000e7baf1a7 (patch) | |
tree | 059d11bfc384d80c7ff07d3457e994ac50a0c07e /src/Endstops/SwitchEndstop.h | |
parent | 8ded9143fa9d07dcddd525683403980c42881f1a (diff) |
Conditional GCode fixes and exception specifiers
Loops are now working
Added noexcept specifiers to omst of the remaining C++ source files
Diffstat (limited to 'src/Endstops/SwitchEndstop.h')
-rw-r--r-- | src/Endstops/SwitchEndstop.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/Endstops/SwitchEndstop.h b/src/Endstops/SwitchEndstop.h index e0fa278f..09733484 100644 --- a/src/Endstops/SwitchEndstop.h +++ b/src/Endstops/SwitchEndstop.h @@ -16,33 +16,33 @@ class SwitchEndstop : public Endstop { public: - void* operator new(size_t sz) { return Allocate<SwitchEndstop>(); } - void operator delete(void* p) { Release<SwitchEndstop>(p); } - ~SwitchEndstop() override; + void* operator new(size_t sz) noexcept { return Allocate<SwitchEndstop>(); } + void operator delete(void* p) noexcept { Release<SwitchEndstop>(p); } + ~SwitchEndstop() noexcept override; - SwitchEndstop(uint8_t axis, EndStopPosition pos); + SwitchEndstop(uint8_t axis, EndStopPosition pos) noexcept; - EndStopType GetEndstopType() const override; - EndStopHit Stopped() const override; - bool Prime(const Kinematics& kin, const AxisDriversConfig& axisDrivers) override; - EndstopHitDetails CheckTriggered(bool goingSlow) override; - bool Acknowledge(EndstopHitDetails what) override; - void AppendDetails(const StringRef& str) override; + EndStopType GetEndstopType() const noexcept override; + EndStopHit Stopped() const noexcept override; + bool Prime(const Kinematics& kin, const AxisDriversConfig& axisDrivers) noexcept override; + EndstopHitDetails CheckTriggered(bool goingSlow) noexcept override; + bool Acknowledge(EndstopHitDetails what) noexcept override; + void AppendDetails(const StringRef& str) noexcept override; #if SUPPORT_CAN_EXPANSION // Process a remote endstop input change that relates to this endstop. Return true if the buffer has been freed. - void HandleRemoteInputChange(CanAddress src, uint8_t handleMinor, bool state) override; + void HandleRemoteInputChange(CanAddress src, uint8_t handleMinor, bool state) noexcept override; #endif - GCodeResult Configure(GCodeBuffer& gb, const StringRef& reply); - GCodeResult Configure(const char *pinNames, const StringRef& reply); + GCodeResult Configure(GCodeBuffer& gb, const StringRef& reply) THROWS_PARSE_ERROR; + GCodeResult Configure(const char *pinNames, const StringRef& reply) noexcept; private: typedef uint16_t PortsBitmap; - void ReleasePorts(); + void ReleasePorts() noexcept; - inline bool IsTriggered(size_t index) const + inline bool IsTriggered(size_t index) const noexcept { #if SUPPORT_CAN_EXPANSION return (boardNumbers[index] == CanId::MasterAddress) ? ports[index].Read() : states[index]; |