event/PollGroupWinSelect: use std::copy_n()
This commit is contained in:
parent
f73c4643ef
commit
7e7a1613cf
@ -22,11 +22,10 @@
|
|||||||
|
|
||||||
#include "PollResultGeneric.hxx"
|
#include "PollResultGeneric.hxx"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
|
||||||
@ -46,9 +45,7 @@ public:
|
|||||||
|
|
||||||
SocketSet(const SocketSet &other) noexcept {
|
SocketSet(const SocketSet &other) noexcept {
|
||||||
set.fd_count = other.set.fd_count;
|
set.fd_count = other.set.fd_count;
|
||||||
memcpy(set.fd_array,
|
std::copy_n(other.set.fd_array, set.fd_count, set.fd_array);
|
||||||
other.set.fd_array,
|
|
||||||
sizeof (SOCKET) * set.fd_count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fd_set *GetPtr() noexcept {
|
fd_set *GetPtr() noexcept {
|
||||||
|
Loading…
Reference in New Issue
Block a user