Skip to content

Commit fdf405c

Browse files
committed
@hathach believes having noexcept means code might throw exceptions. As it has zero effect in this codebase, I am removing to avoid arguments.
1 parent 02045e3 commit fdf405c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

cores/nRF5/Tone.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ class TONE_PWM_CONFIG {
6767
boolean is_initialized; //< defaults to uninitialized
6868

6969
public:
70-
bool EnsurePwmPeripheralOwnership(void) noexcept;
71-
bool InitializeFromPulseCountAndTimePeriod(uint64_t pulse_count, uint16_t time_period) noexcept;
72-
bool ApplyConfiguration(uint32_t pin) noexcept;
73-
bool StartPlayback(void) noexcept;
74-
bool StopPlayback(bool releaseOwnership = false) noexcept;
75-
bool ApplyConfigurationAndStartPlayback(uint32_t pin) noexcept;
76-
uint64_t CalculateExpectedPulseCount(void) noexcept;
70+
bool EnsurePwmPeripheralOwnership(void);
71+
bool InitializeFromPulseCountAndTimePeriod(uint64_t pulse_count, uint16_t time_period);
72+
bool ApplyConfiguration(uint32_t pin);
73+
bool StartPlayback(void);
74+
bool StopPlayback(bool releaseOwnership = false);
75+
bool ApplyConfigurationAndStartPlayback(uint32_t pin);
76+
uint64_t CalculateExpectedPulseCount(void);
7777
};
7878
TONE_PWM_CONFIG _pwm_config;
7979

@@ -116,15 +116,15 @@ constexpr inline static uint64_t _calculate_pulse_count(uint32_t frequency, uint
116116
(duration / 1000ULL) * frequency :
117117
(((uint64_t)duration) * frequency / 1000ULL);
118118
};
119-
inline static int _bits_used(unsigned long x) noexcept {
119+
inline static int _bits_used(unsigned long x) {
120120
if (0 == x) return 0;
121121
unsigned int result = 0;
122122
do {
123123
result++;
124124
} while (x >>= 1);
125125
return result;
126126
}
127-
inline static int _bits_used(unsigned long long x) noexcept {
127+
inline static int _bits_used(unsigned long long x) {
128128
if (0 == x) return 0;
129129
unsigned int result = 0;
130130
do {
@@ -265,7 +265,7 @@ bool TONE_PWM_CONFIG::EnsurePwmPeripheralOwnership(void) {
265265
// COUNT += (start at SEQ0) ? (SEQ0.CNT * (SEQ0.REFRESH+1) : 0;
266266
// COUNT += 1; // final SEQ1 emits single pulse
267267
//
268-
bool TONE_PWM_CONFIG::InitializeFromPulseCountAndTimePeriod(uint64_t pulse_count_x, uint16_t time_period) noexcept {
268+
bool TONE_PWM_CONFIG::InitializeFromPulseCountAndTimePeriod(uint64_t pulse_count_x, uint16_t time_period) {
269269

270270
if (_bits_used(pulse_count_x) > 37) {
271271
LOG_LV1("TON", "pulse count is limited to 37 bit long value");
@@ -339,7 +339,7 @@ bool TONE_PWM_CONFIG::InitializeFromPulseCountAndTimePeriod(uint64_t pulse_count
339339
this->is_initialized = true;
340340
return true;
341341
}
342-
bool TONE_PWM_CONFIG::ApplyConfiguration(uint32_t pin) noexcept {
342+
bool TONE_PWM_CONFIG::ApplyConfiguration(uint32_t pin) {
343343
if (!this->is_initialized) {
344344
return false;
345345
}
@@ -394,7 +394,7 @@ bool TONE_PWM_CONFIG::ApplyConfiguration(uint32_t pin) noexcept {
394394
nrf_pwm_event_clear(_PWMInstance, NRF_PWM_EVENT_LOOPSDONE);
395395
return true;
396396
}
397-
bool TONE_PWM_CONFIG::StartPlayback(void) noexcept {
397+
bool TONE_PWM_CONFIG::StartPlayback(void) {
398398
if (!this->is_initialized) {
399399
LOG_LV1("TON", "Cannot start playback without first initializing");
400400
return false;

0 commit comments

Comments
 (0)