From 43d633f560ee2499a02094039fa1ec24d8f47f14 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max.kellermann@gmail.com>
Date: Sun, 23 Jul 2023 09:13:36 +0200
Subject: [PATCH] Instance: use C++11 initializers

---
 src/Instance.cxx | 9 +--------
 src/Instance.hxx | 6 +++---
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/src/Instance.cxx b/src/Instance.cxx
index 5875890f1..58fb18ea2 100644
--- a/src/Instance.cxx
+++ b/src/Instance.cxx
@@ -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
 {
diff --git a/src/Instance.hxx b/src/Instance.hxx
index 72e17c249..6b14d8476 100644
--- a/src/Instance.hxx
+++ b/src/Instance.hxx
@@ -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;