mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
AK: Move String::~String() and String::destroy_string() to StringBase
This commit is contained in:
parent
54d149bc25
commit
1b09a1851e
Notes:
sideshowbarker
2024-07-17 09:56:35 +09:00
Author: https://github.com/DanShaders
Commit: 1b09a1851e
Pull-request: https://github.com/SerenityOS/serenity/pull/21661
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/kleinesfilmroellchen
Reviewed-by: https://github.com/trflynn89
4 changed files with 15 additions and 14 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue