diff options
author | Max Kellermann <max@musicpd.org> | 2017-08-10 18:25:22 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-08-10 19:19:58 +0200 |
commit | 492b20a89d98739d0020f0c8c449ce8778405fc4 (patch) | |
tree | bdd11a6b1c5a1eb63e256931a2b20d076ca47760 /src/event/MultiSocketMonitor.cxx | |
parent | fcfc8bacc008ce04aa75e50cb33825648bba917f (diff) |
event/SocketMonitor: use class SocketDescriptor
Diffstat (limited to 'src/event/MultiSocketMonitor.cxx')
-rw-r--r-- | src/event/MultiSocketMonitor.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/event/MultiSocketMonitor.cxx b/src/event/MultiSocketMonitor.cxx index 02a51e96f..f36c9163a 100644 --- a/src/event/MultiSocketMonitor.cxx +++ b/src/event/MultiSocketMonitor.cxx @@ -57,9 +57,9 @@ MultiSocketMonitor::ReplaceSocketList(pollfd *pfds, unsigned n) { pollfd *const end = pfds + n; - UpdateSocketList([pfds, end](int fd) -> unsigned { + UpdateSocketList([pfds, end](SocketDescriptor fd) -> unsigned { auto i = std::find_if(pfds, end, [fd](const struct pollfd &pfd){ - return pfd.fd == fd; + return pfd.fd == fd.Get(); }); if (i == end) return 0; @@ -71,7 +71,7 @@ MultiSocketMonitor::ReplaceSocketList(pollfd *pfds, unsigned n) for (auto i = pfds; i != end; ++i) if (i->events != 0) - AddSocket(i->fd, i->events); + AddSocket(SocketDescriptor(i->fd), i->events); } #endif |