decoder/List: add `noexcept`

This commit is contained in:
Max Kellermann 2019-02-05 22:11:51 +01:00
parent 9e73ea77b4
commit e85b24bee0
2 changed files with 4 additions and 3 deletions

View File

@ -152,7 +152,8 @@ decoder_plugin_init_all(const ConfigData &config)
} }
} }
void decoder_plugin_deinit_all(void) void
decoder_plugin_deinit_all() noexcept
{ {
decoder_plugins_for_each_enabled([=](const DecoderPlugin &plugin){ decoder_plugins_for_each_enabled([=](const DecoderPlugin &plugin){
plugin.Finish(); plugin.Finish();

View File

@ -40,11 +40,11 @@ decoder_plugin_init_all(const ConfigData &config);
/* this is where we "unload" all the "plugins" */ /* this is where we "unload" all the "plugins" */
void void
decoder_plugin_deinit_all(); decoder_plugin_deinit_all() noexcept;
template<typename F> template<typename F>
static inline const DecoderPlugin * static inline const DecoderPlugin *
decoder_plugins_find(F f) decoder_plugins_find(F f) noexcept
{ {
for (unsigned i = 0; decoder_plugins[i] != nullptr; ++i) for (unsigned i = 0; decoder_plugins[i] != nullptr; ++i)
if (decoder_plugins_enabled[i] && f(*decoder_plugins[i])) if (decoder_plugins_enabled[i] && f(*decoder_plugins[i]))