nwm/nwm_uds: Avoid copying all elements in channel_data map where applicable (#5236)
By using a reference here, we avoid copying every single element in the map, each of which contains a std::share_ptr and std::deque containing std::vectors.
This commit is contained in:
parent
b96b7ab3f6
commit
e54b640e0b
1 changed files with 3 additions and 3 deletions
|
@ -554,7 +554,7 @@ void NWM_UDS::Shutdown(Kernel::HLERequestContext& ctx) {
|
|||
|
||||
initialized = false;
|
||||
|
||||
for (auto bind_node : channel_data) {
|
||||
for (auto& bind_node : channel_data) {
|
||||
bind_node.second.event->Signal();
|
||||
}
|
||||
channel_data.clear();
|
||||
|
@ -963,7 +963,7 @@ void NWM_UDS::DestroyNetwork(Kernel::HLERequestContext& ctx) {
|
|||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
|
||||
for (auto bind_node : channel_data) {
|
||||
for (auto& bind_node : channel_data) {
|
||||
bind_node.second.event->Signal();
|
||||
}
|
||||
channel_data.clear();
|
||||
|
@ -1009,7 +1009,7 @@ void NWM_UDS::DisconnectNetwork(Kernel::HLERequestContext& ctx) {
|
|||
|
||||
SendPacket(deauth);
|
||||
|
||||
for (auto bind_node : channel_data) {
|
||||
for (auto& bind_node : channel_data) {
|
||||
bind_node.second.event->Signal();
|
||||
}
|
||||
channel_data.clear();
|
||||
|
|
Loading…
Reference in a new issue