diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-12-08 14:50:31 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-10 11:49:24 +0000 |
commit | 8940f2da7fec4b4e375777c861e65ff04465f255 (patch) | |
tree | d1ac58cae77af94ea378a93fb818e8787faed542 /Userland/DevTools/Profiler/main.cpp | |
parent | e338a0656dd8e99e9ed64abf98d15e219adb9755 (diff) | |
download | serenity-8940f2da7fec4b4e375777c861e65ff04465f255.zip |
LibCore: Use `Core::Stream` for `ProcessStatisticsReader`
Diffstat (limited to 'Userland/DevTools/Profiler/main.cpp')
-rw-r--r-- | Userland/DevTools/Profiler/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/DevTools/Profiler/main.cpp b/Userland/DevTools/Profiler/main.cpp index c06a6057dc..fe3bad2b65 100644 --- a/Userland/DevTools/Profiler/main.cpp +++ b/Userland/DevTools/Profiler/main.cpp @@ -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 |