Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
This commit is contained in:
parent
eca98eeb3e
commit
7d8f115185
158 changed files with 669 additions and 634 deletions
|
@ -262,7 +262,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]);
|
||||
|
@ -278,7 +278,7 @@ static u32 HexToInt(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);
|
||||
|
@ -293,7 +293,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;
|
||||
|
@ -361,7 +361,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();
|
||||
|
@ -371,7 +371,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>()));
|
||||
}
|
||||
|
||||
|
@ -473,7 +473,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