mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
AK: Use StringView literals in Format to avoid strlen
We don't want to be constructing StringViews at runtime if we don't have to in Formatter code.
This commit is contained in:
parent
e49af4bac9
commit
4842c8c902
Notes:
sideshowbarker
2024-07-18 08:46:22 +09:00
Author: https://github.com/ADKaster
Commit: 4842c8c902
Pull-request: https://github.com/SerenityOS/serenity/pull/8845
Reviewed-by: https://github.com/alimpfard
2 changed files with 4 additions and 4 deletions
|
@ -442,7 +442,7 @@ void FormatBuilder::put_hexdump(ReadonlyBytes bytes, size_t width, char fill)
|
|||
if (width > 0) {
|
||||
if (i % width == 0 && i) {
|
||||
put_char_view(i);
|
||||
put_literal("\n");
|
||||
put_literal("\n"sv);
|
||||
}
|
||||
}
|
||||
put_u64(bytes[i], 16, false, false, true, Align::Right, 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue