event/PollGroupWinSelect: move IsEmpty() check to GetPtr()
This commit is contained in:
parent
8b94e8f260
commit
f73c4643ef
@ -142,9 +142,9 @@ PollGroupWinSelect::ReadEvents(PollResultGeneric &result,
|
||||
}
|
||||
|
||||
int ret = select(0,
|
||||
read_set.IsEmpty() ? nullptr : read_set.GetPtr(),
|
||||
write_set.IsEmpty() ? nullptr : write_set.GetPtr(),
|
||||
except_set.IsEmpty() ? nullptr : except_set.GetPtr(),
|
||||
read_set.GetPtr(),
|
||||
write_set.GetPtr(),
|
||||
except_set.GetPtr(),
|
||||
timeout_ms < 0 ? nullptr : &tv);
|
||||
|
||||
if (ret == 0 || ret == SOCKET_ERROR)
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
}
|
||||
|
||||
fd_set *GetPtr() noexcept {
|
||||
return &set;
|
||||
return IsEmpty() ? nullptr : &set;
|
||||
}
|
||||
|
||||
size_t Size() const noexcept {
|
||||
|
Loading…
Reference in New Issue
Block a user