mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-09 20:52:54 +00:00
AK: Add StringBuilder::appendff using the new format.
StringBuilder::appendf was already used, thus this name. If we some day replace all usages of printf, we could rename this method.
This commit is contained in:
parent
4fcdc19b14
commit
e5497a326a
Notes:
sideshowbarker
2024-07-19 02:17:10 +09:00
Author: https://github.com/asynts
Commit: e5497a326a
Pull-request: https://github.com/SerenityOS/serenity/pull/3580
3 changed files with 12 additions and 4 deletions
Kernel
|
@ -46,7 +46,7 @@ String UserOrKernelBuffer::copy_into_string(size_t size) const
|
|||
return data_copy;
|
||||
}
|
||||
|
||||
return String({ m_buffer, size });
|
||||
return String(ReadonlyBytes { m_buffer, size });
|
||||
}
|
||||
|
||||
bool UserOrKernelBuffer::write(const void* src, size_t offset, size_t len)
|
||||
|
@ -80,7 +80,7 @@ bool UserOrKernelBuffer::memset(int value, size_t offset, size_t len)
|
|||
|
||||
if (is_user_address(VirtualAddress(m_buffer)))
|
||||
return memset_user(m_buffer + offset, value, len);
|
||||
|
||||
|
||||
::memset(m_buffer + offset, value, len);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue