summaryrefslogtreecommitdiff
path: root/src/archive
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-02-05 21:40:07 +0100
committerMax Kellermann <max@musicpd.org>2019-02-05 21:40:07 +0100
commitc9ba4f3f9ca99742e25503be15963a96c0a9e356 (patch)
tree584bbd83638161b2eff1d23690fd8875c3fd6500 /src/archive
parentc0e9246a662044906e13125e0aae97662d59ef7c (diff)
archive/List: add RAII class
Diffstat (limited to 'src/archive')
-rw-r--r--src/archive/ArchiveList.hxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/archive/ArchiveList.hxx b/src/archive/ArchiveList.hxx
index ea0c5d09e..224ac08f3 100644
--- a/src/archive/ArchiveList.hxx
+++ b/src/archive/ArchiveList.hxx
@@ -46,4 +46,15 @@ archive_plugin_init_all();
void
archive_plugin_deinit_all() noexcept;
+class ScopeArchivePluginsInit {
+public:
+ ScopeArchivePluginsInit() {
+ archive_plugin_init_all();
+ }
+
+ ~ScopeArchivePluginsInit() noexcept {
+ archive_plugin_deinit_all();
+ }
+};
+
#endif