event/PollGroupWinSelect: use std::copy_n()

This commit is contained in:
Max Kellermann 2020-10-12 12:39:52 +02:00
parent f73c4643ef
commit 7e7a1613cf

View File

@ -22,11 +22,10 @@
#include "PollResultGeneric.hxx"
#include <algorithm>
#include <cassert>
#include <unordered_map>
#include <string.h>
#include <windows.h>
#include <winsock2.h>
@ -46,9 +45,7 @@ public:
SocketSet(const SocketSet &other) noexcept {
set.fd_count = other.set.fd_count;
memcpy(set.fd_array,
other.set.fd_array,
sizeof (SOCKET) * set.fd_count);
std::copy_n(other.set.fd_array, set.fd_count, set.fd_array);
}
fd_set *GetPtr() noexcept {