diff options
author | Max Kellermann <max@musicpd.org> | 2016-12-27 23:08:11 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2016-12-27 23:13:26 +0100 |
commit | 018c5ef7316561ab1d1855d2b368be3767f6c8da (patch) | |
tree | ab9c83a3fd706b105b90416475d701b38735d2c3 /src | |
parent | fdb136f1fa02f22e7dc9d3754c64355cd0757943 (diff) |
event/Loop: use C++11 initializers
Diffstat (limited to 'src')
-rw-r--r-- | src/event/Loop.cxx | 7 | ||||
-rw-r--r-- | src/event/Loop.hxx | 8 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/event/Loop.cxx b/src/event/Loop.cxx index 545654cd8..82e68ff7e 100644 --- a/src/event/Loop.cxx +++ b/src/event/Loop.cxx @@ -30,12 +30,7 @@ EventLoop::EventLoop() :SocketMonitor(*this), - now_ms(::MonotonicClockMS()), - quit(false), busy(true), -#ifndef NDEBUG - virgin(true), -#endif - thread(ThreadId::Null()) + now_ms(::MonotonicClockMS()) { SocketMonitor::Open(wake_fd.Get()); SocketMonitor::Schedule(SocketMonitor::READ); diff --git a/src/event/Loop.hxx b/src/event/Loop.hxx index 3232aaa41..a658520fe 100644 --- a/src/event/Loop.hxx +++ b/src/event/Loop.hxx @@ -81,7 +81,7 @@ class EventLoop final : SocketMonitor unsigned now_ms; - bool quit; + bool quit = false; /** * True when the object has been modified and another check is @@ -95,14 +95,14 @@ class EventLoop final : SocketMonitor * * Protected with #mutex. */ - bool busy; + bool busy = true; #ifndef NDEBUG /** * True if Run() was never called. This is used for assert() * calls. */ - bool virgin; + bool virgin = true; #endif PollGroup poll_group; @@ -111,7 +111,7 @@ class EventLoop final : SocketMonitor /** * A reference to the thread that is currently inside Run(). */ - ThreadId thread; + ThreadId thread = ThreadId::Null(); public: EventLoop(); |