summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-12-22 14:27:31 +0000
committerTim Flynn <trflynn89@pm.me>2023-02-03 07:19:52 -0500
commitd4f0cfec7f65a62bf780fe9b5833600f3cc8a745 (patch)
treea58e9d9bddf2d6f433fe728f7693e69eb34f955d /Userland
parent9f4bf1b04e0ddd8d379c64be282f99bc15594998 (diff)
downloadserenity-d4f0cfec7f65a62bf780fe9b5833600f3cc8a745.zip
Utilities/arp: Replace uses of JsonObject::get_deprecated()/get_ptr()
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Utilities/arp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Utilities/arp.cpp b/Userland/Utilities/arp.cpp
index da65cd1a61..bb1315f4ae 100644
--- a/Userland/Utilities/arp.cpp
+++ b/Userland/Utilities/arp.cpp
@@ -95,13 +95,13 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
Vector<JsonValue> sorted_regions = json.as_array().values();
quick_sort(sorted_regions, [](auto& a, auto& b) {
- return a.as_object().get_deprecated("ip_address"sv).to_deprecated_string() < b.as_object().get_deprecated("ip_address"sv).to_deprecated_string();
+ return a.as_object().get_deprecated_string("ip_address"sv).value_or({}) < b.as_object().get_deprecated_string("ip_address"sv).value_or({});
});
for (auto& value : sorted_regions) {
auto& if_object = value.as_object();
- auto ip_address = if_object.get_deprecated("ip_address"sv).to_deprecated_string();
+ auto ip_address = if_object.get_deprecated_string("ip_address"sv).value_or({});
if (!flag_numeric) {
auto from_string = IPv4Address::from_string(ip_address);
@@ -114,7 +114,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
}
}
- auto mac_address = if_object.get_deprecated("mac_address"sv).to_deprecated_string();
+ auto mac_address = if_object.get_deprecated_string("mac_address"sv).value_or({});
if (proto_address_column != -1)
columns[proto_address_column].buffer = ip_address;