diff options
author | David Crocker <dcrocker@eschertech.com> | 2019-12-15 21:19:14 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2019-12-15 21:19:14 +0300 |
commit | 3ed3cbd488e4b895d9af424698f14b6df517d8f6 (patch) | |
tree | d070efea2485b18e051ec7474ca44f9f55a7060c /src/Fans/Fan.h | |
parent | e556f168ef61e239624ea33878936819e4134d5e (diff) |
Added more noexcept specifiers
Diffstat (limited to 'src/Fans/Fan.h')
-rw-r--r-- | src/Fans/Fan.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/Fans/Fan.h b/src/Fans/Fan.h index a5c7b249..12a088f0 100644 --- a/src/Fans/Fan.h +++ b/src/Fans/Fan.h @@ -21,16 +21,16 @@ class GCodeBuffer; class Fan { public: - Fan(unsigned int fanNum); + Fan(unsigned int fanNum) noexcept; - virtual ~Fan() { } - virtual bool Check() = 0; // update the fan PWM returning true if it is a thermostatic fan that is on - virtual GCodeResult SetPwmFrequency(PwmFrequency freq, const StringRef& reply) = 0; - virtual bool IsEnabled() const = 0; - virtual int32_t GetRPM() = 0; - virtual GCodeResult ReportPortDetails(const StringRef& str) const = 0; + virtual ~Fan() noexcept { } + virtual bool Check() noexcept = 0; // update the fan PWM returning true if it is a thermostatic fan that is on + virtual GCodeResult SetPwmFrequency(PwmFrequency freq, const StringRef& reply) noexcept = 0; + virtual bool IsEnabled() const noexcept = 0; + virtual int32_t GetRPM() noexcept = 0; + virtual GCodeResult ReportPortDetails(const StringRef& str) const noexcept = 0; #if SUPPORT_CAN_EXPANSION - virtual void UpdateRpmFromRemote(CanAddress src, int32_t rpm) = 0; + virtual void UpdateRpmFromRemote(CanAddress src, int32_t rpm) noexcept = 0; #endif // Set or report the parameters for this fan @@ -38,21 +38,21 @@ public: // then search for parameters used to configure the fan. If any are found, perform appropriate actions and return true. // If errors were discovered while processing parameters, put an appropriate error message in 'reply' and set 'error' to true. // If no relevant parameters are found, print the existing ones to 'reply' and return false. - bool Configure(unsigned int mcode, size_t fanNum, GCodeBuffer& gb, const StringRef& reply, bool& error); - bool IsConfigured() const { return isConfigured && IsEnabled(); } + bool Configure(unsigned int mcode, size_t fanNum, GCodeBuffer& gb, const StringRef& reply, bool& error) noexcept; + bool IsConfigured() const noexcept { return isConfigured && IsEnabled(); } - float GetConfiguredPwm() const { return val; } // returns the configured PWM. Actual PWM may be different, e.g. due to blipping or for thermostatic fans. + float GetConfiguredPwm() const noexcept { return val; } // returns the configured PWM. Actual PWM may be different, e.g. due to blipping or for thermostatic fans. - GCodeResult SetPwm(float speed, const StringRef& reply); - bool HasMonitoredSensors() const { return sensorsMonitored != 0; } - const char *GetName() const { return name.c_str(); } + GCodeResult SetPwm(float speed, const StringRef& reply) noexcept; + bool HasMonitoredSensors() const noexcept { return sensorsMonitored != 0; } + const char *GetName() const noexcept { return name.c_str(); } #if HAS_MASS_STORAGE - bool WriteSettings(FileStore *f, size_t fanNum) const; // save the settings of this fan if it isn't thermostatic + bool WriteSettings(FileStore *f, size_t fanNum) const noexcept; // save the settings of this fan if it isn't thermostatic #endif protected: - virtual GCodeResult Refresh(const StringRef& reply) = 0; - virtual bool UpdateFanConfiguration(const StringRef& reply) = 0; + virtual GCodeResult Refresh(const StringRef& reply) noexcept = 0; + virtual bool UpdateFanConfiguration(const StringRef& reply) noexcept = 0; unsigned int fanNumber; |