From e1e8f459831994185e6d0e0cd0b61271116ef9fa Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 18 Aug 2022 14:16:50 +0200 Subject: [PATCH] mixer/Control: add `noexcept` --- src/mixer/MixerControl.cxx | 8 ++++---- src/mixer/MixerControl.hxx | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mixer/MixerControl.cxx b/src/mixer/MixerControl.cxx index 998d4aaa6..aefd8312f 100644 --- a/src/mixer/MixerControl.cxx +++ b/src/mixer/MixerControl.cxx @@ -36,7 +36,7 @@ mixer_new(EventLoop &event_loop, } void -mixer_free(Mixer *mixer) +mixer_free(Mixer *mixer) noexcept { assert(mixer != nullptr); @@ -66,7 +66,7 @@ mixer_open(Mixer &mixer) } static void -mixer_close_internal(Mixer &mixer) +mixer_close_internal(Mixer &mixer) noexcept { assert(mixer.open); @@ -76,7 +76,7 @@ mixer_close_internal(Mixer &mixer) } void -mixer_close(Mixer &mixer) +mixer_close(Mixer &mixer) noexcept { const std::scoped_lock protect(mixer.mutex); @@ -85,7 +85,7 @@ mixer_close(Mixer &mixer) } void -mixer_auto_close(Mixer &mixer) +mixer_auto_close(Mixer &mixer) noexcept { if (!mixer.IsGlobal()) mixer_close(mixer); diff --git a/src/mixer/MixerControl.hxx b/src/mixer/MixerControl.hxx index b2e91cba0..944f842ab 100644 --- a/src/mixer/MixerControl.hxx +++ b/src/mixer/MixerControl.hxx @@ -42,7 +42,7 @@ mixer_new(EventLoop &event_loop, const MixerPlugin &plugin, const ConfigBlock &block); void -mixer_free(Mixer *mixer); +mixer_free(Mixer *mixer) noexcept; /** * Throws std::runtime_error on error. @@ -51,14 +51,14 @@ void mixer_open(Mixer &mixer); void -mixer_close(Mixer &mixer); +mixer_close(Mixer &mixer) noexcept; /** * Close the mixer unless the plugin's "global" flag is set. This is * called when the #AudioOutput is closed. */ void -mixer_auto_close(Mixer &mixer); +mixer_auto_close(Mixer &mixer) noexcept; /** * Throws std::runtime_error on error.