1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

AK: Use StringBuilder::appendff() instead of appendf()

This commit is contained in:
Andreas Kling 2021-02-09 16:08:11 +01:00
parent db0149056f
commit 764af6cdec
4 changed files with 11 additions and 11 deletions

View file

@ -207,9 +207,9 @@ void dump_bytes(ReadonlyBytes bytes)
auto flush = [&]() {
if (nrepeat > 0) {
if (nrepeat == 1)
builder.appendf("%s0x%02x", prefix, static_cast<int>(buffered_byte));
builder.appendff("{}{:#02x}", prefix, static_cast<int>(buffered_byte));
else
builder.appendf("%s%zu * 0x%02x", prefix, nrepeat, static_cast<int>(buffered_byte));
builder.appendff("{}{} * {:#02x}", prefix, nrepeat, static_cast<int>(buffered_byte));
nrepeat = 0;
prefix = ", ";