mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
AK: Add String::number() for creating a String from a number.
Instead of manually doing String::format("%d"/"%u") everywhere, let's have
a String API for this. It's just a wrapper around format() for now, but it
could be made more efficient in the future.
This commit is contained in:
@@ -207,9 +207,9 @@ void ProcessModel::update()
|
||||
{
|
||||
auto it = m_usernames.find((uid_t)uid);
|
||||
if (it != m_usernames.end())
|
||||
state.user = String::format("%s", (*it).value.characters());
|
||||
state.user = (*it).value;
|
||||
else
|
||||
state.user = String::format("%u", uid);
|
||||
state.user = String::number(uid);
|
||||
}
|
||||
state.priority = process_object.get("priority").to_string();
|
||||
state.syscalls = process_object.get("syscall_count").to_dword();
|
||||
|
||||
Reference in New Issue
Block a user