event/Loop: inline field initializers
This commit is contained in:
parent
5f2797e7cc
commit
ef8797821f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue