Commit 051b8fbb authored by Max Kellermann's avatar Max Kellermann

output/Thread: add "noexcept"

parent b0ea32f6
...@@ -38,7 +38,7 @@ static constexpr PeriodClock::Duration REOPEN_AFTER = std::chrono::seconds(10); ...@@ -38,7 +38,7 @@ static constexpr PeriodClock::Duration REOPEN_AFTER = std::chrono::seconds(10);
struct notify audio_output_client_notify; struct notify audio_output_client_notify;
AudioOutputControl::AudioOutputControl(FilteredAudioOutput *_output, AudioOutputControl::AudioOutputControl(FilteredAudioOutput *_output,
AudioOutputClient &_client) AudioOutputClient &_client) noexcept
:output(_output), client(_client), :output(_output), client(_client),
thread(BIND_THIS_METHOD(Task)) thread(BIND_THIS_METHOD(Task))
{ {
......
...@@ -212,10 +212,10 @@ public: ...@@ -212,10 +212,10 @@ public:
mutable Mutex mutex; mutable Mutex mutex;
AudioOutputControl(FilteredAudioOutput *_output, AudioOutputControl(FilteredAudioOutput *_output,
AudioOutputClient &_client); AudioOutputClient &_client) noexcept;
#ifndef NDEBUG #ifndef NDEBUG
~AudioOutputControl() { ~AudioOutputControl() noexcept {
assert(!fail_timer.IsDefined()); assert(!fail_timer.IsDefined());
assert(!thread.IsDefined()); assert(!thread.IsDefined());
assert(output == nullptr); assert(output == nullptr);
...@@ -490,7 +490,7 @@ private: ...@@ -490,7 +490,7 @@ private:
/** /**
* Caller must lock the mutex. * Caller must lock the mutex.
*/ */
bool FillSourceOrClose(); bool FillSourceOrClose() noexcept;
/** /**
* Caller must lock the mutex. * Caller must lock the mutex.
...@@ -528,7 +528,7 @@ private: ...@@ -528,7 +528,7 @@ private:
/** /**
* The OutputThread. * The OutputThread.
*/ */
void Task(); void Task() noexcept;
}; };
#endif #endif
...@@ -226,7 +226,7 @@ AudioOutputControl::WaitForDelay() noexcept ...@@ -226,7 +226,7 @@ AudioOutputControl::WaitForDelay() noexcept
} }
bool bool
AudioOutputControl::FillSourceOrClose() AudioOutputControl::FillSourceOrClose() noexcept
try { try {
return source.Fill(mutex); return source.Fill(mutex);
} catch (...) { } catch (...) {
...@@ -402,7 +402,7 @@ AudioOutputControl::InternalDrain() noexcept ...@@ -402,7 +402,7 @@ AudioOutputControl::InternalDrain() noexcept
} }
void void
AudioOutputControl::Task() AudioOutputControl::Task() noexcept
{ {
FormatThreadName("output:%s", GetName()); FormatThreadName("output:%s", GetName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment