From f52d08c7f0fda95b25c984d39c5e53ebdc57323f Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Fri, 31 Jan 2025 18:03:27 +0000 Subject: [PATCH] cleanup: initialize vars in the EventLoop constructor in the correct order This fixes: warning: field 'm_context' will be initialized after field 'm_task_set' [-Wreorder-ctor] --- src/mp/proxy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mp/proxy.cpp b/src/mp/proxy.cpp index 8f34e82a..d9ad4f39 100644 --- a/src/mp/proxy.cpp +++ b/src/mp/proxy.cpp @@ -156,9 +156,9 @@ void Connection::addAsyncCleanup(std::function fn) EventLoop::EventLoop(const char* exe_name, LogFn log_fn, void* context) : m_exe_name(exe_name), m_io_context(kj::setupAsyncIo()), + m_task_set(new kj::TaskSet(m_error_handler)), m_log_fn(std::move(log_fn)), - m_context(context), - m_task_set(new kj::TaskSet(m_error_handler)) + m_context(context) { int fds[2]; KJ_SYSCALL(socketpair(AF_UNIX, SOCK_STREAM, 0, fds));