chore: ArchNetworkBSD:Deps use make_shared now that we dont build on ubuntu 22 anymore
This commit is contained in:
@ -73,10 +73,7 @@ int ArchNetworkBSD::Deps::poll(struct pollfd *fds, nfds_t nfds, int timeout)
|
||||
|
||||
std::shared_ptr<struct pollfd[]> ArchNetworkBSD::Deps::makePollFD(nfds_t n)
|
||||
{
|
||||
// C++20 supports std::make_shared<struct pollfd[]>(n) but this is not
|
||||
// implemented on the compiler that comes with Ubuntu 22 and a few other
|
||||
// distros, so use the manual new and delete until we drop those distros.
|
||||
return std::shared_ptr<struct pollfd[]>(new struct pollfd[n], std::default_delete<struct pollfd[]>());
|
||||
return std::make_shared<struct pollfd[]>(n);
|
||||
}
|
||||
|
||||
ssize_t ArchNetworkBSD::Deps::read(int fd, void *buf, size_t len)
|
||||
|
||||
Reference in New Issue
Block a user