mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
LibCore: Use Core::Stream
for ProcessStatisticsReader
This commit is contained in:
parent
e338a0656d
commit
8940f2da7f
18 changed files with 55 additions and 95 deletions
|
@ -352,8 +352,8 @@ bool generate_profile(pid_t& pid)
|
|||
DeprecatedString process_name;
|
||||
|
||||
auto all_processes = Core::ProcessStatisticsReader::get_all();
|
||||
if (all_processes.has_value()) {
|
||||
auto& processes = all_processes->processes;
|
||||
if (!all_processes.is_error()) {
|
||||
auto& processes = all_processes.value().processes;
|
||||
if (auto it = processes.find_if([&](auto& entry) { return entry.pid == pid; }); it != processes.end())
|
||||
process_name = it->name;
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue