summaryrefslogtreecommitdiff
path: root/Userland/Utilities/w.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-23 11:08:32 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-23 11:10:15 +0200
commita1e133cc6bf8617d8299e4f1ae8df7b7d5289205 (patch)
treed473905c402aa6d82357ee82e8591aff4b20e39c /Userland/Utilities/w.cpp
parenta345a1f4a155ae62fb218f7f4c13d08911a73397 (diff)
downloadserenity-a1e133cc6bf8617d8299e4f1ae8df7b7d5289205.zip
LibCore: Make ProcessStatisticsReader return results in a Vector
The HashMap API was overkill and made using this less ergonomic than it should be.
Diffstat (limited to 'Userland/Utilities/w.cpp')
-rw-r--r--Userland/Utilities/w.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Utilities/w.cpp b/Userland/Utilities/w.cpp
index 1014ddfa5d..66dc7915b2 100644
--- a/Userland/Utilities/w.cpp
+++ b/Userland/Utilities/w.cpp
@@ -95,9 +95,9 @@ int main()
String what = "n/a";
- for (auto& it : process_statistics.value()) {
- if (it.value.tty == tty && it.value.pid == it.value.pgid)
- what = it.value.name;
+ for (auto& process : process_statistics.value()) {
+ if (process.tty == tty && process.pid == process.pgid)
+ what = process.name;
}
printf("%-10s %-12s %-16s %-6s %s\n",