Mercurial > minori
comparison dep/animia/src/fd/win32.cc @ 148:aa4df5a84338
dep/animia: use std::pair instead of std::tuple
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Tue, 14 Nov 2023 13:27:13 -0500 |
| parents | 1e696863b54c |
| children | ffa535b6d630 |
comparison
equal
deleted
inserted
replaced
| 147:6fdf0632c003 | 148:aa4df5a84338 |
|---|---|
| 241 | 241 |
| 242 return true; | 242 return true; |
| 243 } | 243 } |
| 244 | 244 |
| 245 /* this could be changed to being a callback, but... I'm too lazy right now :) */ | 245 /* this could be changed to being a callback, but... I'm too lazy right now :) */ |
| 246 bool Win32FdTools::EnumerateOpenFiles(const std::set<pid_t>& pids, std::vector<std::tuple<pid_t, std::string>>& files) { | 246 bool Win32FdTools::EnumerateOpenFiles(const std::set<pid_t>& pids, std::vector<std::pair<pid_t, std::string>>& files) { |
| 247 std::unordered_map<pid_t, Handle> proc_handles; | 247 std::unordered_map<pid_t, Handle> proc_handles; |
| 248 | 248 |
| 249 for (const pid_t& pid : pids) { | 249 for (const pid_t& pid : pids) { |
| 250 const HANDLE handle = ::OpenProcess(PROCESS_DUP_HANDLE, false, pid); | 250 const HANDLE handle = ::OpenProcess(PROCESS_DUP_HANDLE, false, pid); |
| 251 if (handle) | 251 if (handle) |
