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

AK: Move String::~String() and String::destroy_string() to StringBase

This commit is contained in:
Dan Klishch 2023-10-28 15:42:33 -04:00 committed by Andrew Kaster
parent 54d149bc25
commit 1b09a1851e
4 changed files with 15 additions and 14 deletions

View file

@ -122,12 +122,6 @@ void StringData::compute_hash() const
}
void String::destroy_string()
{
if (!is_short_string())
m_data->unref();
}
String String::from_utf8_without_validation(ReadonlyBytes bytes)
{
if (bytes.size() <= MAX_SHORT_STRING_BYTE_COUNT) {