summaryrefslogtreecommitdiff
path: root/test/dump_text_file.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-02-05 21:50:31 +0100
committerMax Kellermann <max@musicpd.org>2019-02-05 22:07:49 +0100
commit9e73ea77b4ccd4131823ddc156322a2e4082d417 (patch)
tree50a5ed0b8b1eafd0e130ff757e700b9bda780504 /test/dump_text_file.cxx
parentb0739eca87439a8f9cc2a0f9a6fcba1f68708df6 (diff)
input/Init: add RAII class
Diffstat (limited to 'test/dump_text_file.cxx')
-rw-r--r--test/dump_text_file.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/dump_text_file.cxx b/test/dump_text_file.cxx
index 18cdc7061..ab3ccf12a 100644
--- a/test/dump_text_file.cxx
+++ b/test/dump_text_file.cxx
@@ -42,15 +42,13 @@ class GlobalInit {
const ScopeArchivePluginsInit archive_plugins_init;
#endif
+ const ScopeInputPluginsInit input_plugins_init;
+
public:
- GlobalInit() {
+ GlobalInit()
+ :input_plugins_init(ConfigData(), io_thread.GetEventLoop())
+ {
io_thread.Start();
- input_stream_global_init(ConfigData(),
- io_thread.GetEventLoop());
- }
-
- ~GlobalInit() {
- input_stream_global_finish();
}
};