Skip to content

Commit f52d08c

Browse files
committed
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]
1 parent 07c917f commit f52d08c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mp/proxy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ void Connection::addAsyncCleanup(std::function<void()> fn)
156156
EventLoop::EventLoop(const char* exe_name, LogFn log_fn, void* context)
157157
: m_exe_name(exe_name),
158158
m_io_context(kj::setupAsyncIo()),
159+
m_task_set(new kj::TaskSet(m_error_handler)),
159160
m_log_fn(std::move(log_fn)),
160-
m_context(context),
161-
m_task_set(new kj::TaskSet(m_error_handler))
161+
m_context(context)
162162
{
163163
int fds[2];
164164
KJ_SYSCALL(socketpair(AF_UNIX, SOCK_STREAM, 0, fds));

0 commit comments

Comments
 (0)