1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 00:55:08 +00:00

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
parent f4d7151c3c
commit af2c3ab524

View file

@ -29,7 +29,7 @@ OwnPtr<KString> KString::try_create_uninitialized(size_t length, char*& characte
return {};
auto* new_string = new (slot) KString(length);
characters = new_string->m_characters;
return adopt_own(*new_string);
return adopt_own_if_nonnull(new_string);
}
OwnPtr<KString> KString::try_clone() const