mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 12:04:16 +01:00
Update some c-style casts -> reinterpret_cast
This commit is contained in:
parent
6e45de760e
commit
696c0904f8
@ -851,9 +851,10 @@ static void ReadMemory() {
|
||||
MemToGdbHex(reply, data.data(), len);
|
||||
reply[len * 2] = '\0';
|
||||
|
||||
LOG_DEBUG(Debug_GDBStub, "ReadMemory result: {}", (char*)reply);
|
||||
auto reply_str = reinterpret_cast<char*>(reply);
|
||||
|
||||
SendReply(reinterpret_cast<char*>(reply));
|
||||
LOG_DEBUG(Debug_GDBStub, "ReadMemory result: {}", reply_str);
|
||||
SendReply(reply_str);
|
||||
}
|
||||
|
||||
/// Modify location in memory with data received from the gdb client.
|
||||
|
@ -140,13 +140,14 @@ void HandleHioReply(const u8* const command_buffer, const u32 command_length) {
|
||||
return;
|
||||
}
|
||||
|
||||
u64 unsigned_retval = HexToInt((u8*)command_parts[0].data(), command_parts[0].size());
|
||||
u64 unsigned_retval =
|
||||
HexToInt(reinterpret_cast<const u8*>(command_parts[0].data()), command_parts[0].size());
|
||||
current_hio_request.retval *= unsigned_retval;
|
||||
|
||||
if (command_parts.size() > 1) {
|
||||
// Technically the errno could be signed but in practice this doesn't happen
|
||||
current_hio_request.gdb_errno =
|
||||
HexToInt((u8*)command_parts[1].data(), command_parts[1].size());
|
||||
HexToInt(reinterpret_cast<const u8*>(command_parts[1].data()), command_parts[1].size());
|
||||
} else {
|
||||
current_hio_request.gdb_errno = 0;
|
||||
}
|
||||
@ -228,7 +229,7 @@ bool HandlePendingHioRequestPacket() {
|
||||
case 's':
|
||||
// strings are written as {pointer}/{length}
|
||||
fmt::format_to(std::back_inserter(packet), ",{:x}/{:x}",
|
||||
(u32)current_hio_request.parameters[i],
|
||||
static_cast<u32>(current_hio_request.parameters[i]),
|
||||
current_hio_request.string_lengths[nStr++]);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user