diff options
author | Max Kellermann <max@musicpd.org> | 2017-11-10 20:16:26 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-11-10 20:16:26 +0100 |
commit | 81350d65bce1546aff46967f8bf25e2b7f4de7a9 (patch) | |
tree | 1ebc7198b7bb9a88c42da1d49e7f3f269df1bf75 /src/event/SocketMonitor.hxx | |
parent | 02642a64fdde822a15eff3528b1b0d8cd02f643a (diff) |
event/SocketMonitor: use C++11 initializers
Diffstat (limited to 'src/event/SocketMonitor.hxx')
-rw-r--r-- | src/event/SocketMonitor.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/event/SocketMonitor.hxx b/src/event/SocketMonitor.hxx index d63cab0ab..79ba2efa3 100644 --- a/src/event/SocketMonitor.hxx +++ b/src/event/SocketMonitor.hxx @@ -45,13 +45,13 @@ class EventLoop; * as thread-safe. */ class SocketMonitor { - SocketDescriptor fd; + SocketDescriptor fd = SocketDescriptor::Undefined(); EventLoop &loop; /** * A bit mask of events that is currently registered in the EventLoop. */ - unsigned scheduled_flags; + unsigned scheduled_flags = 0; public: static constexpr unsigned READ = PollGroup::READ; @@ -62,10 +62,10 @@ public: typedef std::make_signed<size_t>::type ssize_t; SocketMonitor(EventLoop &_loop) - :fd(-1), loop(_loop), scheduled_flags(0) {} + :loop(_loop) {} SocketMonitor(SocketDescriptor _fd, EventLoop &_loop) - :fd(_fd), loop(_loop), scheduled_flags(0) {} + :fd(_fd), loop(_loop) {} ~SocketMonitor(); |