diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-12-21 11:42:06 +0000 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-01-17 19:52:52 -0500 |
commit | 1dd6b7f5b787e1893b708ddf58492f9fdd50ae51 (patch) | |
tree | 3f9f665b573fa3097b707b1cc8cb08e1572b34cd /Userland/Applets/ResourceGraph | |
parent | efe4329f9fe448eb17784d7a9b9e6e519ec4fa57 (diff) | |
download | serenity-1dd6b7f5b787e1893b708ddf58492f9fdd50ae51.zip |
AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()
This is a preparatory step to making `get()` return `ErrorOr`.
Diffstat (limited to 'Userland/Applets/ResourceGraph')
-rw-r--r-- | Userland/Applets/ResourceGraph/main.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Userland/Applets/ResourceGraph/main.cpp b/Userland/Applets/ResourceGraph/main.cpp index 1c43ba4843..ca418f3894 100644 --- a/Userland/Applets/ResourceGraph/main.cpp +++ b/Userland/Applets/ResourceGraph/main.cpp @@ -167,8 +167,8 @@ private: return false; auto const& obj = json.value().as_object(); - total = obj.get("total_time"sv).to_u64(); - idle = obj.get("idle_time"sv).to_u64(); + total = obj.get_deprecated("total_time"sv).to_u64(); + idle = obj.get_deprecated("idle_time"sv).to_u64(); return true; } @@ -179,11 +179,11 @@ private: return false; auto const& obj = json.value().as_object(); - unsigned kmalloc_allocated = obj.get("kmalloc_allocated"sv).to_u32(); - unsigned kmalloc_available = obj.get("kmalloc_available"sv).to_u32(); - auto physical_allocated = obj.get("physical_allocated"sv).to_u64(); - auto physical_committed = obj.get("physical_committed"sv).to_u64(); - auto physical_uncommitted = obj.get("physical_uncommitted"sv).to_u64(); + unsigned kmalloc_allocated = obj.get_deprecated("kmalloc_allocated"sv).to_u32(); + unsigned kmalloc_available = obj.get_deprecated("kmalloc_available"sv).to_u32(); + auto physical_allocated = obj.get_deprecated("physical_allocated"sv).to_u64(); + auto physical_committed = obj.get_deprecated("physical_committed"sv).to_u64(); + auto physical_uncommitted = obj.get_deprecated("physical_uncommitted"sv).to_u64(); unsigned kmalloc_bytes_total = kmalloc_allocated + kmalloc_available; unsigned kmalloc_pages_total = (kmalloc_bytes_total + PAGE_SIZE - 1) / PAGE_SIZE; u64 total_userphysical_and_swappable_pages = kmalloc_pages_total + physical_allocated + physical_committed + physical_uncommitted; @@ -203,13 +203,13 @@ private: auto const& array = json.value().as_array(); for (auto const& adapter_value : array.values()) { auto const& adapter_obj = adapter_value.as_object(); - if (!adapter_obj.has_string("ipv4_address"sv) || !adapter_obj.get("link_up"sv).as_bool()) + if (!adapter_obj.has_string("ipv4_address"sv) || !adapter_obj.get_deprecated("link_up"sv).as_bool()) continue; - tx += adapter_obj.get("bytes_in"sv).to_u64(); - rx += adapter_obj.get("bytes_out"sv).to_u64(); + tx += adapter_obj.get_deprecated("bytes_in"sv).to_u64(); + rx += adapter_obj.get_deprecated("bytes_out"sv).to_u64(); // Link speed data is given in megabits, but we want all return values to be in bytes. - link_speed += adapter_obj.get("link_speed"sv).to_u64() * 8'000'000; + link_speed += adapter_obj.get_deprecated("link_speed"sv).to_u64() * 8'000'000; } link_speed /= 8; return tx != 0; |