mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 11:09:18 +00:00
AK: Reduce code duplication in StringBuilder
This commit is contained in:
parent
d8df9c510c
commit
6da131d5db
Notes:
sideshowbarker
2024-07-19 17:37:08 +09:00
Author: https://github.com/f-eiwu
Commit: 6da131d5db
Pull-request: https://github.com/SerenityOS/serenity/pull/1386
Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 5 deletions
|
@ -54,11 +54,7 @@ void StringBuilder::append(const StringView& str)
|
|||
|
||||
void StringBuilder::append(const char* characters, size_t length)
|
||||
{
|
||||
if (!length)
|
||||
return;
|
||||
will_append(length);
|
||||
memcpy(m_buffer.data() + m_length, characters, length);
|
||||
m_length += length;
|
||||
append(StringView { characters, length });
|
||||
}
|
||||
|
||||
void StringBuilder::append(char ch)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue