Sfoglia il codice sorgente

nvhost_vic: use map erase by key

Liam 2 anni fa
parent
commit
04867e2456
1 ha cambiato i file con 1 aggiunte e 4 eliminazioni
  1. 1 4
      src/core/hle/service/nvdrv/devices/nvhost_vic.cpp

+ 1 - 4
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