Commit 7e7a1613 authored by Max Kellermann's avatar Max Kellermann

event/PollGroupWinSelect: use std::copy_n()

parent f73c4643
...@@ -22,11 +22,10 @@ ...@@ -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: ...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment