event/WinSelect: reorder method prototypes

This commit is contained in:
Max Kellermann 2020-10-30 15:44:54 +01:00
parent fee29001fa
commit 938319cd44
1 changed files with 9 additions and 7 deletions

View File

@ -99,17 +99,13 @@ class WinSelectBackend
SocketSet event_set[2]; SocketSet event_set[2];
std::unordered_map<SOCKET, Item> items; std::unordered_map<SOCKET, Item> items;
bool CanModify(Item &item, unsigned events,
int event_id) const noexcept;
void Modify(Item &item, SOCKET fd, unsigned events,
int event_id) noexcept;
WinSelectBackend(WinSelectBackend &) = delete;
WinSelectBackend &operator=(WinSelectBackend &) = delete;
public: public:
WinSelectBackend() noexcept; WinSelectBackend() noexcept;
~WinSelectBackend() noexcept; ~WinSelectBackend() noexcept;
WinSelectBackend(WinSelectBackend &) = delete;
WinSelectBackend &operator=(WinSelectBackend &) = delete;
PollResultGeneric ReadEvents(int timeout_ms) noexcept; PollResultGeneric ReadEvents(int timeout_ms) noexcept;
bool Add(SOCKET fd, unsigned events, void *obj) noexcept; bool Add(SOCKET fd, unsigned events, void *obj) noexcept;
bool Modify(SOCKET fd, unsigned events, void *obj) noexcept; bool Modify(SOCKET fd, unsigned events, void *obj) noexcept;
@ -117,6 +113,12 @@ public:
bool Abandon(SOCKET fd) noexcept { bool Abandon(SOCKET fd) noexcept {
return Remove(fd); return Remove(fd);
} }
private:
bool CanModify(Item &item, unsigned events,
int event_id) const noexcept;
void Modify(Item &item, SOCKET fd, unsigned events,
int event_id) noexcept;
}; };
#endif #endif