archive/List: add `noexcept`

This commit is contained in:
Max Kellermann 2019-02-05 21:38:46 +01:00
parent 096c23f27d
commit c0e9246a66
2 changed files with 7 additions and 6 deletions

View File

@ -49,7 +49,7 @@ static bool archive_plugins_enabled[ARRAY_SIZE(archive_plugins) - 1];
if (archive_plugins_enabled[archive_plugin_iterator - archive_plugins])
const ArchivePlugin *
archive_plugin_from_suffix(const char *suffix)
archive_plugin_from_suffix(const char *suffix) noexcept
{
if (suffix == nullptr)
return nullptr;
@ -63,7 +63,7 @@ archive_plugin_from_suffix(const char *suffix)
}
const ArchivePlugin *
archive_plugin_from_name(const char *name)
archive_plugin_from_name(const char *name) noexcept
{
archive_plugins_for_each_enabled(plugin)
if (strcmp(plugin->name, name) == 0)
@ -81,7 +81,8 @@ void archive_plugin_init_all(void)
}
}
void archive_plugin_deinit_all(void)
void
archive_plugin_deinit_all() noexcept
{
archive_plugins_for_each_enabled(plugin)
if (plugin->finish != nullptr)

View File

@ -33,10 +33,10 @@ extern const ArchivePlugin *const archive_plugins[];
/* interface for using plugins */
const ArchivePlugin *
archive_plugin_from_suffix(const char *suffix);
archive_plugin_from_suffix(const char *suffix) noexcept;
const ArchivePlugin *
archive_plugin_from_name(const char *name);
archive_plugin_from_name(const char *name) noexcept;
/* this is where we "load" all the "plugins" ;-) */
void
@ -44,6 +44,6 @@ archive_plugin_init_all();
/* this is where we "unload" all the "plugins" */
void
archive_plugin_deinit_all();
archive_plugin_deinit_all() noexcept;
#endif