output/oss: add noexcept

This commit is contained in:
Max Kellermann 2019-07-04 22:42:19 +02:00
parent f54710b100
commit 6c22c34300

View File

@ -124,7 +124,7 @@ private:
*/ */
void Reopen(); void Reopen();
void DoClose(); void DoClose() noexcept;
}; };
static constexpr Domain oss_output_domain("oss_output"); static constexpr Domain oss_output_domain("oss_output");
@ -138,7 +138,7 @@ enum oss_stat {
}; };
static enum oss_stat static enum oss_stat
oss_stat_device(const char *device, int *errno_r) oss_stat_device(const char *device, int *errno_r) noexcept
{ {
struct stat st; struct stat st;
@ -166,7 +166,7 @@ oss_stat_device(const char *device, int *errno_r)
static const char *const default_devices[] = { "/dev/sound/dsp", "/dev/dsp" }; static const char *const default_devices[] = { "/dev/sound/dsp", "/dev/dsp" };
static bool static bool
oss_output_test_default_device(void) oss_output_test_default_device() noexcept
{ {
for (int i = ARRAY_SIZE(default_devices); --i >= 0; ) { for (int i = ARRAY_SIZE(default_devices); --i >= 0; ) {
UniqueFileDescriptor fd; UniqueFileDescriptor fd;
@ -231,7 +231,7 @@ OssOutput::Create(EventLoop &, const ConfigBlock &block)
} }
void void
OssOutput::DoClose() OssOutput::DoClose() noexcept
{ {
if (fd.IsDefined()) if (fd.IsDefined())
fd.Close(); fd.Close();