Use include <cstring> and std::memcpy etc
This commit is contained in:
@@ -47,7 +47,7 @@ ConnectionRegistry::~ConnectionRegistry() {
|
||||
|
||||
void ConnectionRegistry::store(int fd, std::unique_ptr<Connection> connection) {
|
||||
if (fd < 0 || static_cast<size_t>(fd) >= max_fds_) {
|
||||
abort();
|
||||
std::abort();
|
||||
}
|
||||
// Release ownership from unique_ptr and store raw pointer
|
||||
connections_[fd].store(connection.release(), std::memory_order_release);
|
||||
@@ -55,7 +55,7 @@ void ConnectionRegistry::store(int fd, std::unique_ptr<Connection> connection) {
|
||||
|
||||
std::unique_ptr<Connection> ConnectionRegistry::remove(int fd) {
|
||||
if (fd < 0 || static_cast<size_t>(fd) >= max_fds_) {
|
||||
abort();
|
||||
std::abort();
|
||||
}
|
||||
return std::unique_ptr<Connection>(
|
||||
connections_[fd].exchange(nullptr, std::memory_order_acquire));
|
||||
|
||||
Reference in New Issue
Block a user