From 04867e2456d926364ede540954767cc39c58e464 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 15 Jan 2024 21:53:20 -0500 Subject: nvhost_vic: use map erase by key --- src/core/hle/service/nvdrv/devices/nvhost_vic.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp index 263061f1d..bf090f5eb 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp @@ -78,10 +78,7 @@ void nvhost_vic::OnClose(DeviceFD fd) { if (iter != host1x_file.fd_to_id.end()) { system.GPU().ClearCdmaInstance(iter->second); } - auto it = sessions.find(fd); - if (it != sessions.end()) { - sessions.erase(it); - } + sessions.erase(fd); } } // namespace Service::Nvidia::Devices -- cgit v1.2.3