diff options
author | Max Kellermann <max@musicpd.org> | 2019-02-05 21:50:31 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-02-05 22:07:49 +0100 |
commit | 9e73ea77b4ccd4131823ddc156322a2e4082d417 (patch) | |
tree | 50a5ed0b8b1eafd0e130ff757e700b9bda780504 /src/input | |
parent | b0739eca87439a8f9cc2a0f9a6fcba1f68708df6 (diff) |
input/Init: add RAII class
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/Init.hxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/input/Init.hxx b/src/input/Init.hxx index cba1a663e..ed6615131 100644 --- a/src/input/Init.hxx +++ b/src/input/Init.hxx @@ -35,4 +35,16 @@ input_stream_global_init(const ConfigData &config, EventLoop &event_loop); void input_stream_global_finish() noexcept; +class ScopeInputPluginsInit { +public: + ScopeInputPluginsInit(const ConfigData &config, + EventLoop &event_loop) { + input_stream_global_init(config, event_loop); + } + + ~ScopeInputPluginsInit() noexcept { + input_stream_global_finish(); + } +}; + #endif |