Mercurial > code
changeset 444:fc055d2a4a2c
Socket: fix kqueue update
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 23 Oct 2015 10:11:34 +0200 |
parents | 9c85d9158990 |
children | f5e62f6c1475 |
files | C++/modules/Socket/Sockets.cpp C++/modules/Socket/Sockets.h |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/C++/modules/Socket/Sockets.cpp Fri Oct 23 10:00:47 2015 +0200 +++ b/C++/modules/Socket/Sockets.cpp Fri Oct 23 10:11:34 2015 +0200 @@ -582,7 +582,7 @@ } } -std::vector<ListenerStatus> Kqueue::wait(const ListenerTable &table, int ms) +std::vector<ListenerStatus> Kqueue::wait(const ListenerTable &, int ms) { std::vector<ListenerStatus> sockets; timespec ts = { 0, 0 }; @@ -601,7 +601,10 @@ } for (int i = 0; i < nevents; ++i) { - sockets.push_back(ListenerStatus{m_result[i].ident, m_result[i].filter == EVFILT_READ ? FlagRead : FlagWrite}); + sockets.push_back(ListenerStatus{ + static_cast<Handle>(m_result[i].ident), + m_result[i].filter == EVFILT_READ ? FlagRead : FlagWrite + }); } return sockets;
--- a/C++/modules/Socket/Sockets.h Fri Oct 23 10:00:47 2015 +0200 +++ b/C++/modules/Socket/Sockets.h Fri Oct 23 10:11:34 2015 +0200 @@ -430,7 +430,7 @@ * @param type the type of socket implementation */ explicit inline Socket(Handle handle, Type type = Type{}) noexcept - : m_type{std::move(type)} + : m_type(std::move(type)) , m_handle{handle} { } @@ -445,7 +445,7 @@ * @throw Error on failures */ Socket(int domain, int type, int protocol, Type iface = Type{}) - : m_type{std::move(iface)} + : m_type(std::move(iface)) { #if !defined(SOCKET_NO_AUTO_INIT) init();