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

Use new format functions in remaining DevTools. (#3755)

* AK: Add formatter for JsonValue.

* Inspector: Use new format functions.

* Profiler: Use new format functions.

* UserspaceEmulator: Use new format functions.
This commit is contained in:
Paul Scharnofske 2020-10-13 18:34:27 +02:00 committed by GitHub
parent 626bb1be9c
commit d94f674bbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 45 additions and 37 deletions

View file

@ -167,11 +167,11 @@ GUI::Variant DisassemblyModel::data(const GUI::ModelIndex& index, GUI::ModelRole
return insn.event_count;
}
if (index.column() == Column::Address)
return String::format("%#08x", insn.address);
return String::formatted("{:p}", insn.address);
if (index.column() == Column::InstructionBytes) {
StringBuilder builder;
for (auto ch : insn.bytes) {
builder.appendf("%02x ", (u8)ch);
builder.appendff("{:02x} ", (u8)ch);
}
return builder.to_string();
}