mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
Network.Applet: Avoid JsonObject copy and use StringBuilder::appendff()
This commit is contained in:
parent
d33fdc925b
commit
73aa59ccf1
1 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ private:
|
|||
|
||||
int connected_adapters = 0;
|
||||
json.value().as_array().for_each([&adapter_info, include_loopback, &connected_adapters](auto& value) {
|
||||
auto if_object = value.as_object();
|
||||
auto& if_object = value.as_object();
|
||||
auto ip_address = if_object.get("ipv4_address").to_string();
|
||||
auto ifname = if_object.get("name").to_string();
|
||||
|
||||
|
@ -151,7 +151,7 @@ private:
|
|||
if (ip_address != "null")
|
||||
connected_adapters++;
|
||||
|
||||
adapter_info.appendf("%s: %s\n", ifname.characters(), ip_address.characters());
|
||||
adapter_info.appendff("{}: {}\n", ifname, ip_address);
|
||||
});
|
||||
|
||||
// show connected icon so long as at least one adapter is connected
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue