mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-29 00:10:02 -05:00
impr: Remove hex::format, improve format and logging type safety
This commit is contained in:
@@ -37,7 +37,7 @@ namespace hex::plugin::disasm {
|
||||
|
||||
size_t instructionCount = cs_disasm(capstone, data.data(), data.size(), u64(baseAddress), 0, &instructions);
|
||||
for (size_t i = 0; i < instructionCount; i++) {
|
||||
disassembly.push_back({ instructions[i].address, { instructions[i].bytes, instructions[i].bytes + instructions[i].size }, hex::format("{} {}", instructions[i].mnemonic, instructions[i].op_str) });
|
||||
disassembly.push_back({ instructions[i].address, { instructions[i].bytes, instructions[i].bytes + instructions[i].size }, fmt::format("{} {}", instructions[i].mnemonic, instructions[i].op_str) });
|
||||
}
|
||||
cs_free(instructions, instructionCount);
|
||||
cs_close(&capstone);
|
||||
@@ -58,7 +58,7 @@ namespace hex::plugin::disasm {
|
||||
ImGui::TableNextColumn();
|
||||
std::string bytes;
|
||||
for (auto byte : entry.bytes)
|
||||
bytes += hex::format("{0:02X} ", byte);
|
||||
bytes += fmt::format("{0:02X} ", byte);
|
||||
ImGui::TextUnformatted(bytes.c_str());
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted(entry.instruction.c_str());
|
||||
|
||||
Reference in New Issue
Block a user