mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 16:07:45 +00:00
Everywhere: Prefer {:#x} over 0x{:x} in format strings
The former automatically adapts the prefix to binary and octal output, and is what we already use in the majority of cases. Patch generated by: rg -l '0x\{' | xargs sed -i '' -e 's/0x{:/{:#/' I ran it 4 times (until it stopped changing things) since each invocation only converted one instance per line. No behavior change.
This commit is contained in:
parent
f963bb4f36
commit
24a469f521
18 changed files with 64 additions and 64 deletions
|
@ -42,7 +42,7 @@ ErrorOr<void> FullBox::read_from_stream(BoxStream& stream)
|
|||
|
||||
void FullBox::dump(String const& prepend) const
|
||||
{
|
||||
outln("{}{} (version = {}, flags = 0x{:x})", prepend, box_type(), version, flags);
|
||||
outln("{}{} (version = {}, flags = {:#x})", prepend, box_type(), version, flags);
|
||||
}
|
||||
|
||||
static String add_indent(String const& string)
|
||||
|
|
|
@ -1171,7 +1171,7 @@ static ErrorOr<void> read_colour_encoding(JPEGStream& stream, [[maybe_unused]] J
|
|||
context.color_transform = ColorTransform::YCCK;
|
||||
break;
|
||||
default:
|
||||
dbgln("0x{:x} is not a specified transform flag value, ignoring", color_transform);
|
||||
dbgln("{:#x} is not a specified transform flag value, ignoring", color_transform);
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
|
@ -294,7 +294,7 @@ static ErrorOr<VP8XHeader> decode_webp_chunk_VP8X(RIFF::Chunk const& vp8x_chunk)
|
|||
// 3 bytes height minus one
|
||||
u32 height = (vp8x_chunk[7] | (vp8x_chunk[8] << 8) | (vp8x_chunk[9] << 16)) + 1;
|
||||
|
||||
dbgln_if(WEBP_DEBUG, "flags 0x{:x} --{}{}{}{}{}{}, width {}, height {}",
|
||||
dbgln_if(WEBP_DEBUG, "flags {:#x} --{}{}{}{}{}{}, width {}, height {}",
|
||||
flags,
|
||||
has_icc ? " icc" : "",
|
||||
has_alpha ? " alpha" : "",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue