1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

Applets: Replace uses of JsonObject::get_deprecated()/get_ptr()

This commit is contained in:
Sam Atkins 2022-12-21 16:22:02 +00:00 committed by Tim Flynn
parent 87f1a0e957
commit 0716b2afdc
2 changed files with 15 additions and 15 deletions

View file

@ -127,10 +127,10 @@ private:
int connected_adapters = 0;
json.value().as_array().for_each([&adapter_info, &connected_adapters](auto& value) {
auto& if_object = value.as_object();
auto ip_address = if_object.get_deprecated("ipv4_address"sv).as_string_or("no IP");
auto ifname = if_object.get_deprecated("name"sv).to_deprecated_string();
auto link_up = if_object.get_deprecated("link_up"sv).as_bool();
auto link_speed = if_object.get_deprecated("link_speed"sv).to_i32();
auto ip_address = if_object.get_deprecated_string("ipv4_address"sv).value_or("no IP");
auto ifname = if_object.get_deprecated_string("name"sv).value();
auto link_up = if_object.get_bool("link_up"sv).value();
auto link_speed = if_object.get_i32("link_speed"sv).value();
if (ifname == "loop")
return;