diff options
| author | 2018-09-15 15:21:06 +0200 | |
|---|---|---|
| committer | 2018-09-15 15:21:06 +0200 | |
| commit | 63c2e32e207d31ecadd9022e1d7cd705c9febac8 (patch) | |
| tree | 8a90e8ef2804f147dff7225a543a8740ecf7160c /src/core/gdbstub/gdbstub.cpp | |
| parent | Merge pull request #1310 from lioncash/kernel-ns (diff) | |
| download | yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.gz yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.xz yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.zip | |
Port #4182 from Citra: "Prefix all size_t with std::"
Diffstat (limited to 'src/core/gdbstub/gdbstub.cpp')
| -rw-r--r-- | src/core/gdbstub/gdbstub.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index 332e5c3d0..cfaf20a88 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp | |||
| @@ -292,7 +292,7 @@ static u8 NibbleToHex(u8 n) { | |||
| 292 | * @param src Pointer to array of output hex string characters. | 292 | * @param src Pointer to array of output hex string characters. |
| 293 | * @param len Length of src array. | 293 | * @param len Length of src array. |
| 294 | */ | 294 | */ |
| 295 | static u32 HexToInt(const u8* src, size_t len) { | 295 | static u32 HexToInt(const u8* src, std::size_t len) { |
| 296 | u32 output = 0; | 296 | u32 output = 0; |
| 297 | while (len-- > 0) { | 297 | while (len-- > 0) { |
| 298 | output = (output << 4) | HexCharToValue(src[0]); | 298 | output = (output << 4) | HexCharToValue(src[0]); |
| @@ -307,7 +307,7 @@ static u32 HexToInt(const u8* src, size_t len) { | |||
| 307 | * @param src Pointer to array of output hex string characters. | 307 | * @param src Pointer to array of output hex string characters. |
| 308 | * @param len Length of src array. | 308 | * @param len Length of src array. |
| 309 | */ | 309 | */ |
| 310 | static u64 HexToLong(const u8* src, size_t len) { | 310 | static u64 HexToLong(const u8* src, std::size_t len) { |
| 311 | u64 output = 0; | 311 | u64 output = 0; |
| 312 | while (len-- > 0) { | 312 | while (len-- > 0) { |
| 313 | output = (output << 4) | HexCharToValue(src[0]); | 313 | output = (output << 4) | HexCharToValue(src[0]); |
| @@ -323,7 +323,7 @@ static u64 HexToLong(const u8* src, size_t len) { | |||
| 323 | * @param src Pointer to array of u8 bytes. | 323 | * @param src Pointer to array of u8 bytes. |
| 324 | * @param len Length of src array. | 324 | * @param len Length of src array. |
| 325 | */ | 325 | */ |
| 326 | static void MemToGdbHex(u8* dest, const u8* src, size_t len) { | 326 | static void MemToGdbHex(u8* dest, const u8* src, std::size_t len) { |
| 327 | while (len-- > 0) { | 327 | while (len-- > 0) { |
| 328 | u8 tmp = *src++; | 328 | u8 tmp = *src++; |
| 329 | *dest++ = NibbleToHex(tmp >> 4); | 329 | *dest++ = NibbleToHex(tmp >> 4); |
| @@ -338,7 +338,7 @@ static void MemToGdbHex(u8* dest, const u8* src, size_t len) { | |||
| 338 | * @param src Pointer to array of output hex string characters. | 338 | * @param src Pointer to array of output hex string characters. |
| 339 | * @param len Length of src array. | 339 | * @param len Length of src array. |
| 340 | */ | 340 | */ |
| 341 | static void GdbHexToMem(u8* dest, const u8* src, size_t len) { | 341 | static void GdbHexToMem(u8* dest, const u8* src, std::size_t len) { |
| 342 | while (len-- > 0) { | 342 | while (len-- > 0) { |
| 343 | *dest++ = (HexCharToValue(src[0]) << 4) | HexCharToValue(src[1]); | 343 | *dest++ = (HexCharToValue(src[0]) << 4) | HexCharToValue(src[1]); |
| 344 | src += 2; | 344 | src += 2; |
| @@ -406,7 +406,7 @@ static u64 GdbHexToLong(const u8* src) { | |||
| 406 | /// Read a byte from the gdb client. | 406 | /// Read a byte from the gdb client. |
| 407 | static u8 ReadByte() { | 407 | static u8 ReadByte() { |
| 408 | u8 c; | 408 | u8 c; |
| 409 | size_t received_size = recv(gdbserver_socket, reinterpret_cast<char*>(&c), 1, MSG_WAITALL); | 409 | std::size_t received_size = recv(gdbserver_socket, reinterpret_cast<char*>(&c), 1, MSG_WAITALL); |
| 410 | if (received_size != 1) { | 410 | if (received_size != 1) { |
| 411 | LOG_ERROR(Debug_GDBStub, "recv failed: {}", received_size); | 411 | LOG_ERROR(Debug_GDBStub, "recv failed: {}", received_size); |
| 412 | Shutdown(); | 412 | Shutdown(); |
| @@ -416,7 +416,7 @@ static u8 ReadByte() { | |||
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | /// Calculate the checksum of the current command buffer. | 418 | /// Calculate the checksum of the current command buffer. |
| 419 | static u8 CalculateChecksum(const u8* buffer, size_t length) { | 419 | static u8 CalculateChecksum(const u8* buffer, std::size_t length) { |
| 420 | return static_cast<u8>(std::accumulate(buffer, buffer + length, 0, std::plus<u8>())); | 420 | return static_cast<u8>(std::accumulate(buffer, buffer + length, 0, std::plus<u8>())); |
| 421 | } | 421 | } |
| 422 | 422 | ||
| @@ -518,7 +518,7 @@ bool CheckBreakpoint(VAddr addr, BreakpointType type) { | |||
| 518 | * @param packet Packet to be sent to client. | 518 | * @param packet Packet to be sent to client. |
| 519 | */ | 519 | */ |
| 520 | static void SendPacket(const char packet) { | 520 | static void SendPacket(const char packet) { |
| 521 | size_t sent_size = send(gdbserver_socket, &packet, 1, 0); | 521 | std::size_t sent_size = send(gdbserver_socket, &packet, 1, 0); |
| 522 | if (sent_size != 1) { | 522 | if (sent_size != 1) { |
| 523 | LOG_ERROR(Debug_GDBStub, "send failed"); | 523 | LOG_ERROR(Debug_GDBStub, "send failed"); |
| 524 | } | 524 | } |