mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
Kernel: Remove usage of adopt_own in KString
This commit is contained in:
parent
f4d7151c3c
commit
af2c3ab524
Notes:
sideshowbarker
2024-07-18 17:15:18 +09:00
Author: https://github.com/bgianfo
Commit: af2c3ab524
Pull-request: https://github.com/SerenityOS/serenity/pull/7520
Reviewed-by: https://github.com/supercomputer7
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ OwnPtr<KString> KString::try_create_uninitialized(size_t length, char*& characte
|
||||||
return {};
|
return {};
|
||||||
auto* new_string = new (slot) KString(length);
|
auto* new_string = new (slot) KString(length);
|
||||||
characters = new_string->m_characters;
|
characters = new_string->m_characters;
|
||||||
return adopt_own(*new_string);
|
return adopt_own_if_nonnull(new_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
OwnPtr<KString> KString::try_clone() const
|
OwnPtr<KString> KString::try_clone() const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue