mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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
Notes:
sideshowbarker
2024-07-17 22:04:04 +09:00
Author: https://github.com/BertalanD
Commit: 52beeebe70
Pull-request: https://github.com/SerenityOS/serenity/pull/11461
11 changed files with 18 additions and 35 deletions
|
@ -65,12 +65,8 @@ Thread::Thread(NonnullRefPtr<Process> process, NonnullOwnPtr<Memory::Region> ker
|
|||
m_tid = Process::allocate_pid().value();
|
||||
}
|
||||
|
||||
{
|
||||
// FIXME: Go directly to KString
|
||||
auto string = String::formatted("Kernel stack (thread {})", m_tid.value());
|
||||
// FIXME: Handle KString allocation failure.
|
||||
m_kernel_stack_region->set_name(KString::try_create(string).release_value());
|
||||
}
|
||||
// FIXME: Handle KString allocation failure.
|
||||
m_kernel_stack_region->set_name(MUST(KString::formatted("Kernel stack (thread {})", m_tid.value())));
|
||||
|
||||
Thread::all_instances().with([&](auto& list) {
|
||||
list.append(*this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue