poll handle: rename variable to avoid clashing (close #236)

This commit is contained in:
Michele Caini 2021-02-11 23:26:30 +01:00
parent 2ea56b1dd1
commit d799a7fc85
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ UVW_INLINE PollEvent::PollEvent(Flags<details::UVPollEvent> events) noexcept
UVW_INLINE PollHandle::PollHandle(ConstructorAccess ca, std::shared_ptr<Loop> ref, int desc)
: Handle{ca, std::move(ref)}, tag{FD}, fd{desc}
: Handle{ca, std::move(ref)}, tag{FD}, file_desc{desc}
{}
@ -37,7 +37,7 @@ UVW_INLINE void PollHandle::startCallback(uv_poll_t *handle, int status, int eve
UVW_INLINE bool PollHandle::init() {
return (tag == SOCKET) ? initialize(&uv_poll_init_socket, socket) : initialize(&uv_poll_init, fd);
return (tag == SOCKET) ? initialize(&uv_poll_init_socket, socket) : initialize(&uv_poll_init, file_desc);
}

View File

@ -129,7 +129,7 @@ public:
private:
enum { FD, SOCKET } tag;
union {
int fd;
int file_desc;
OSSocketHandle::Type socket;
};
};