1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +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:
Andrew Kaster 2021-07-17 16:05:18 -06:00 committed by Ali Mohammad Pur
parent e49af4bac9
commit 4842c8c902
2 changed files with 4 additions and 4 deletions

View file

@ -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);