mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 23:59:27 +01:00
Socket: Make use of std::erase_if
This commit is contained in:
parent
96eac73d11
commit
e69ac2d43e
@ -1047,10 +1047,7 @@ void WiiSockMan::UpdatePollCommands()
|
||||
auto& system = Core::System::GetInstance();
|
||||
auto& memory = system.GetMemory();
|
||||
|
||||
pending_polls.erase(
|
||||
std::remove_if(
|
||||
pending_polls.begin(), pending_polls.end(),
|
||||
[&system, &memory, this](PollCommand& pcmd) {
|
||||
std::erase_if(pending_polls, [&system, &memory, this](PollCommand& pcmd) {
|
||||
const auto request = Request(system, pcmd.request_addr);
|
||||
auto& pfds = pcmd.wii_fds;
|
||||
int ret = 0;
|
||||
@ -1099,14 +1096,12 @@ void WiiSockMan::UpdatePollCommands()
|
||||
// memory.Write_U32(ufds[i].fd, request.buffer_out + 0xc*i); //fd
|
||||
// memory.Write_U32(events, request.buffer_out + 0xc*i + 4); //events
|
||||
memory.Write_U32(revents, pcmd.buffer_out + 0xc * i + 8); // revents
|
||||
DEBUG_LOG_FMT(IOS_NET,
|
||||
"IOCTL_SO_POLL socket {} wevents {:08X} events {:08X} revents {:08X}",
|
||||
DEBUG_LOG_FMT(IOS_NET, "IOCTL_SO_POLL socket {} wevents {:08X} events {:08X} revents {:08X}",
|
||||
i, revents, pfds[i].events, pfds[i].revents);
|
||||
}
|
||||
GetIOS()->EnqueueIPCReply(request, ret);
|
||||
return true;
|
||||
}),
|
||||
pending_polls.end());
|
||||
});
|
||||
}
|
||||
|
||||
void WiiSockMan::ToNativeAddrIn(const u8* addr, sockaddr_in* to)
|
||||
|
Loading…
x
Reference in New Issue
Block a user