mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
Kernel: Remove the KString::try_create(String::formatted(...)) pattern
We can now directly create formatted KStrings with KString::formatted. :^)
This commit is contained in:
parent
7d6058415e
commit
52beeebe70
11 changed files with 18 additions and 35 deletions
|
@ -43,8 +43,7 @@ ErrorOr<FlatPtr> Process::sys$create_thread(void* (*entry)(void*), Userspace<con
|
|||
|
||||
// We know this thread is not the main_thread,
|
||||
// So give it a unique name until the user calls $set_thread_name on it
|
||||
// FIXME: Don't make a temporary String here
|
||||
auto new_thread_name = TRY(KString::try_create(String::formatted("{} [{}]", m_name, thread->tid().value())));
|
||||
auto new_thread_name = TRY(KString::formatted("{} [{}]", m_name, thread->tid().value()));
|
||||
thread->set_name(move(new_thread_name));
|
||||
|
||||
if (!is_thread_joinable)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue