Commit 7fc04fd5 authored by Max Kellermann's avatar Max Kellermann

event/SocketEvent: move Dispatch() down

parent 7901b04c
...@@ -29,16 +29,6 @@ ...@@ -29,16 +29,6 @@
#endif #endif
void 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 SocketEvent::Open(SocketDescriptor _fd) noexcept
{ {
assert(!fd.IsDefined()); assert(!fd.IsDefined());
...@@ -99,3 +89,13 @@ SocketEvent::Schedule(unsigned flags) noexcept ...@@ -99,3 +89,13 @@ SocketEvent::Schedule(unsigned flags) noexcept
return success; return success;
} }
void
SocketEvent::Dispatch() noexcept
{
const unsigned flags = std::exchange(ready_flags, 0) &
(GetScheduledFlags() | IMPLICIT_FLAGS);
if (flags != 0)
callback(flags);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment