event/SocketEvent: move Dispatch() down

This commit is contained in:
Max Kellermann 2020-10-14 16:21:33 +02:00
parent 7901b04c78
commit 7fc04fd5cd
1 changed files with 10 additions and 10 deletions

View File

@ -28,16 +28,6 @@
#include <cerrno>
#endif
void
SocketEvent::Dispatch() noexcept
{
const unsigned flags = std::exchange(ready_flags, 0) &
(GetScheduledFlags() | IMPLICIT_FLAGS);
if (flags != 0)
callback(flags);
}
void
SocketEvent::Open(SocketDescriptor _fd) noexcept
{
@ -99,3 +89,13 @@ SocketEvent::Schedule(unsigned flags) noexcept
return success;
}
void
SocketEvent::Dispatch() noexcept
{
const unsigned flags = std::exchange(ready_flags, 0) &
(GetScheduledFlags() | IMPLICIT_FLAGS);
if (flags != 0)
callback(flags);
}