LibPDF: Simplify a loop
No behavior change.
This commit is contained in:
parent
e4e1208050
commit
d18f01d7d7
Notes:
sideshowbarker
2024-07-17 01:00:06 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/d18f01d7d7 Pull-request: https://github.com/SerenityOS/serenity/pull/20017 Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 6 additions and 10 deletions
|
@ -145,17 +145,13 @@ DeprecatedString StreamObject::to_deprecated_string(int indent) const
|
|||
}
|
||||
} else {
|
||||
auto string = encode_hex(bytes());
|
||||
while (true) {
|
||||
if (string.length() > 60) {
|
||||
builder.appendff("{}\n", string.substring(0, 60));
|
||||
append_indent(builder, indent);
|
||||
string = string.substring(60);
|
||||
continue;
|
||||
}
|
||||
|
||||
builder.appendff("{}\n", string);
|
||||
break;
|
||||
while (string.length() > 60) {
|
||||
builder.appendff("{}\n", string.substring(0, 60));
|
||||
append_indent(builder, indent);
|
||||
string = string.substring(60);
|
||||
}
|
||||
|
||||
builder.appendff("{}\n", string);
|
||||
}
|
||||
|
||||
builder.append("endstream"sv);
|
||||
|
|
Loading…
Add table
Reference in a new issue