Commit ef879782 authored by Max Kellermann's avatar Max Kellermann

event/Loop: inline field initializers

parent 5f2797e7
......@@ -46,18 +46,15 @@ EventLoop::EventLoop(
ThreadId _thread
#endif
)
:
#ifdef HAVE_THREADED_EVENT_LOOP
wake_event(*this, BIND_THIS_METHOD(OnSocketReady)),
thread(_thread),
:thread(_thread),
/* if this instance is hosted by an EventThread (no ThreadId
known yet) then we're not yet alive until the thread is
started; for the main EventLoop instance, we assume it's
already alive, because nobody but EventThread will call
SetAlive() */
alive(!_thread.IsNull()),
alive(!_thread.IsNull())
#endif
quit(false)
{
#ifdef HAVE_THREADED_EVENT_LOOP
wake_event.Open(SocketDescriptor(wake_fd.Get()));
......
......@@ -63,7 +63,7 @@ class EventLoop final
{
#ifdef HAVE_THREADED_EVENT_LOOP
WakeFD wake_fd;
SocketEvent wake_event;
SocketEvent wake_event{*this, BIND_THIS_METHOD(OnSocketReady)};
#endif
struct TimerCompare {
......@@ -132,7 +132,7 @@ class EventLoop final
bool alive;
#endif
std::atomic_bool quit;
std::atomic_bool quit{false};
/**
* True when the object has been modified and another check is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment