Instance: use C++11 initializers

This commit is contained in:
Max Kellermann 2023-07-23 09:13:36 +02:00
parent 1c37b0487c
commit 43d633f560
2 changed files with 4 additions and 11 deletions

View File

@ -35,14 +35,7 @@
#endif
#endif
Instance::Instance()
:rtio_thread(true),
#ifdef ENABLE_SYSTEMD_DAEMON
systemd_watchdog(event_loop),
#endif
idle_monitor(event_loop, BIND_THIS_METHOD(OnIdle))
{
}
Instance::Instance() = default;
Instance::~Instance() noexcept
{

View File

@ -71,7 +71,7 @@ struct Instance final
/**
* A thread running an #EventLoop for non-blocking (bulk) I/O.
*/
EventThread io_thread;
EventThread io_thread{true};
/**
* Another thread running an #EventLoop for non-blocking
@ -82,7 +82,7 @@ struct Instance final
EventThread rtio_thread;
#ifdef ENABLE_SYSTEMD_DAEMON
Systemd::Watchdog systemd_watchdog;
Systemd::Watchdog systemd_watchdog{event_loop};
#endif
std::unique_ptr<InputCacheManager> input_cache;
@ -91,7 +91,7 @@ struct Instance final
* Monitor for global idle events to be broadcasted to all
* partitions.
*/
MaskMonitor idle_monitor;
MaskMonitor idle_monitor{event_loop, BIND_THIS_METHOD(OnIdle)};
#ifdef ENABLE_NEIGHBOR_PLUGINS
std::unique_ptr<NeighborGlue> neighbors;