From c0e9246a662044906e13125e0aae97662d59ef7c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 5 Feb 2019 21:38:46 +0100 Subject: [PATCH] archive/List: add `noexcept` --- src/archive/ArchiveList.cxx | 7 ++++--- src/archive/ArchiveList.hxx | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/archive/ArchiveList.cxx b/src/archive/ArchiveList.cxx index 128842dd6..f0506bdd4 100644 --- a/src/archive/ArchiveList.cxx +++ b/src/archive/ArchiveList.cxx @@ -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) diff --git a/src/archive/ArchiveList.hxx b/src/archive/ArchiveList.hxx index e72ae0968..ea0c5d09e 100644 --- a/src/archive/ArchiveList.hxx +++ b/src/archive/ArchiveList.hxx @@ -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