summaryrefslogtreecommitdiff
path: root/test/run_input.cxx
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 /test/run_input.cxx
parentc0e9246a662044906e13125e0aae97662d59ef7c (diff)
archive/List: add RAII class
Diffstat (limited to 'test/run_input.cxx')
-rw-r--r--test/run_input.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/run_input.cxx b/test/run_input.cxx
index 8fdf6f81a..c58316ba5 100644
--- a/test/run_input.cxx
+++ b/test/run_input.cxx
@@ -106,6 +106,10 @@ class GlobalInit {
ConfigData config;
EventThread io_thread;
+#ifdef ENABLE_ARCHIVE
+ const ScopeArchivePluginsInit archive_plugins_init;
+#endif
+
public:
GlobalInit(Path config_path, bool verbose) {
SetLogThreshold(verbose ? LogLevel::DEBUG : LogLevel::INFO);
@@ -117,18 +121,12 @@ public:
io_thread.Start();
-#ifdef ENABLE_ARCHIVE
- archive_plugin_init_all();
-#endif
input_stream_global_init(config,
io_thread.GetEventLoop());
}
~GlobalInit() {
input_stream_global_finish();
-#ifdef ENABLE_ARCHIVE
- archive_plugin_deinit_all();
-#endif
}
};