Kernel: Remove usage of adopt_own in KString

This commit is contained in:
Brian Gianforcaro 2021-05-28 05:02:27 -07:00 committed by Andreas Kling
commit af2c3ab524
Notes: sideshowbarker 2024-07-18 17:15:18 +09:00

View file

@ -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