From 333b36f090ad4a045b114eb0c11d3db47a427a9c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Mar 2023 11:57:39 +0100 Subject: [PATCH] output/Registry: add `noexcept` --- src/output/Registry.cxx | 2 +- src/output/Registry.hxx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/output/Registry.cxx b/src/output/Registry.cxx index fe5fadd42..e4ab67fc8 100644 --- a/src/output/Registry.cxx +++ b/src/output/Registry.cxx @@ -94,7 +94,7 @@ constexpr const AudioOutputPlugin *audio_output_plugins[] = { }; const AudioOutputPlugin * -GetAudioOutputPluginByName(const char *name) +GetAudioOutputPluginByName(const char *name) noexcept { audio_output_plugins_for_each(plugin) if (StringIsEqual(plugin->name, name)) diff --git a/src/output/Registry.hxx b/src/output/Registry.hxx index 66250acb1..8fd077bb3 100644 --- a/src/output/Registry.hxx +++ b/src/output/Registry.hxx @@ -8,8 +8,9 @@ struct AudioOutputPlugin; extern const AudioOutputPlugin *const audio_output_plugins[]; +[[gnu::pure]] const AudioOutputPlugin * -GetAudioOutputPluginByName(const char *name); +GetAudioOutputPluginByName(const char *name) noexcept; #define audio_output_plugins_for_each(plugin) \ for (const AudioOutputPlugin *plugin, \