Port #4182 from Citra: "Prefix all size_t with std::"
This commit is contained in:
parent
df5a44a40b
commit
63c2e32e20
146 changed files with 778 additions and 749 deletions
|
@ -292,7 +292,7 @@ static u8 NibbleToHex(u8 n) {
|
|||
* @param src Pointer to array of output hex string characters.
|
||||
* @param len Length of src array.
|
||||
*/
|
||||
static u32 HexToInt(const u8* src, size_t len) {
|
||||
static u32 HexToInt(const u8* src, std::size_t len) {
|
||||
u32 output = 0;
|
||||
while (len-- > 0) {
|
||||
output = (output << 4) | HexCharToValue(src[0]);
|
||||
|
@ -307,7 +307,7 @@ static u32 HexToInt(const u8* src, size_t len) {
|
|||
* @param src Pointer to array of output hex string characters.
|
||||
* @param len Length of src array.
|
||||
*/
|
||||
static u64 HexToLong(const u8* src, size_t len) {
|
||||
static u64 HexToLong(const u8* src, std::size_t len) {
|
||||
u64 output = 0;
|
||||
while (len-- > 0) {
|
||||
output = (output << 4) | HexCharToValue(src[0]);
|
||||
|
@ -323,7 +323,7 @@ static u64 HexToLong(const u8* src, size_t len) {
|
|||
* @param src Pointer to array of u8 bytes.
|
||||
* @param len Length of src array.
|
||||
*/
|
||||
static void MemToGdbHex(u8* dest, const u8* src, size_t len) {
|
||||
static void MemToGdbHex(u8* dest, const u8* src, std::size_t len) {
|
||||
while (len-- > 0) {
|
||||
u8 tmp = *src++;
|
||||
*dest++ = NibbleToHex(tmp >> 4);
|
||||
|
@ -338,7 +338,7 @@ static void MemToGdbHex(u8* dest, const u8* src, size_t len) {
|
|||
* @param src Pointer to array of output hex string characters.
|
||||
* @param len Length of src array.
|
||||
*/
|
||||
static void GdbHexToMem(u8* dest, const u8* src, size_t len) {
|
||||
static void GdbHexToMem(u8* dest, const u8* src, std::size_t len) {
|
||||
while (len-- > 0) {
|
||||
*dest++ = (HexCharToValue(src[0]) << 4) | HexCharToValue(src[1]);
|
||||
src += 2;
|
||||
|
@ -406,7 +406,7 @@ static u64 GdbHexToLong(const u8* src) {
|
|||
/// Read a byte from the gdb client.
|
||||
static u8 ReadByte() {
|
||||
u8 c;
|
||||
size_t received_size = recv(gdbserver_socket, reinterpret_cast<char*>(&c), 1, MSG_WAITALL);
|
||||
std::size_t received_size = recv(gdbserver_socket, reinterpret_cast<char*>(&c), 1, MSG_WAITALL);
|
||||
if (received_size != 1) {
|
||||
LOG_ERROR(Debug_GDBStub, "recv failed: {}", received_size);
|
||||
Shutdown();
|
||||
|
@ -416,7 +416,7 @@ static u8 ReadByte() {
|
|||
}
|
||||
|
||||
/// Calculate the checksum of the current command buffer.
|
||||
static u8 CalculateChecksum(const u8* buffer, size_t length) {
|
||||
static u8 CalculateChecksum(const u8* buffer, std::size_t length) {
|
||||
return static_cast<u8>(std::accumulate(buffer, buffer + length, 0, std::plus<u8>()));
|
||||
}
|
||||
|
||||
|
@ -518,7 +518,7 @@ bool CheckBreakpoint(VAddr addr, BreakpointType type) {
|
|||
* @param packet Packet to be sent to client.
|
||||
*/
|
||||
static void SendPacket(const char packet) {
|
||||
size_t sent_size = send(gdbserver_socket, &packet, 1, 0);
|
||||
std::size_t sent_size = send(gdbserver_socket, &packet, 1, 0);
|
||||
if (sent_size != 1) {
|
||||
LOG_ERROR(Debug_GDBStub, "send failed");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue