mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +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
|
@ -328,7 +328,7 @@ ErrorOr<void, ValidationError> Validator::validate(Limits const& limits, size_t
|
|||
template<u64 opcode>
|
||||
ErrorOr<void, ValidationError> Validator::validate_instruction(Instruction const& instruction, Stack&, bool&)
|
||||
{
|
||||
return Errors::invalid(ByteString::formatted("instruction opcode (0x{:x}) (missing validation!)", instruction.opcode().value()));
|
||||
return Errors::invalid(ByteString::formatted("instruction opcode ({:#x}) (missing validation!)", instruction.opcode().value()));
|
||||
}
|
||||
|
||||
#define VALIDATE_INSTRUCTION(name) \
|
||||
|
@ -3774,7 +3774,7 @@ ErrorOr<void, ValidationError> Validator::validate(Instruction const& instructio
|
|||
#undef M
|
||||
default:
|
||||
is_constant = false;
|
||||
return Errors::invalid(ByteString::formatted("instruction opcode (0x{:x})", instruction.opcode().value()));
|
||||
return Errors::invalid(ByteString::formatted("instruction opcode ({:#x})", instruction.opcode().value()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue