mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-07 15:36:26 +00:00
Add usz alias for std::size_t
This commit is contained in:
parent
360c4d1554
commit
fb29933d3d
173 changed files with 718 additions and 717 deletions
|
|
@ -91,11 +91,11 @@ void rpcn_client::disconnect()
|
|||
server_info_received = false;
|
||||
}
|
||||
|
||||
rpcn_client::recvn_result rpcn_client::recvn(u8* buf, std::size_t n)
|
||||
rpcn_client::recvn_result rpcn_client::recvn(u8* buf, usz n)
|
||||
{
|
||||
u32 num_timeouts = 0;
|
||||
|
||||
size_t n_recv = 0;
|
||||
usz n_recv = 0;
|
||||
while (n_recv != n && !is_abort())
|
||||
{
|
||||
std::lock_guard lock(mutex_socket);
|
||||
|
|
@ -136,7 +136,7 @@ rpcn_client::recvn_result rpcn_client::recvn(u8* buf, std::size_t n)
|
|||
bool rpcn_client::send_packet(const std::vector<u8>& packet)
|
||||
{
|
||||
u32 num_timeouts = 0;
|
||||
std::size_t n_sent = 0;
|
||||
usz n_sent = 0;
|
||||
while (n_sent != packet.size())
|
||||
{
|
||||
std::lock_guard lock(mutex_socket);
|
||||
|
|
@ -723,7 +723,7 @@ bool rpcn_client::createjoin_room(u32 req_id, const SceNpCommunicationId& commun
|
|||
|
||||
builder.Finish(req_finished);
|
||||
u8* buf = builder.GetBufferPointer();
|
||||
size_t bufsize = builder.GetSize();
|
||||
usz bufsize = builder.GetSize();
|
||||
data.resize(COMMUNICATION_ID_SIZE + sizeof(u32) + bufsize);
|
||||
|
||||
memcpy(data.data(), communication_id.data, COMMUNICATION_ID_SIZE);
|
||||
|
|
@ -767,7 +767,7 @@ bool rpcn_client::join_room(u32 req_id, const SceNpCommunicationId& communicatio
|
|||
|
||||
builder.Finish(req_finished);
|
||||
u8* buf = builder.GetBufferPointer();
|
||||
size_t bufsize = builder.GetSize();
|
||||
usz bufsize = builder.GetSize();
|
||||
data.resize(COMMUNICATION_ID_SIZE + sizeof(u32) + bufsize);
|
||||
|
||||
memcpy(data.data(), communication_id.data, COMMUNICATION_ID_SIZE);
|
||||
|
|
@ -789,7 +789,7 @@ bool rpcn_client::leave_room(u32 req_id, const SceNpCommunicationId& communicati
|
|||
auto req_finished = CreateLeaveRoomRequest(builder, req->roomId, final_optdata);
|
||||
builder.Finish(req_finished);
|
||||
u8* buf = builder.GetBufferPointer();
|
||||
size_t bufsize = builder.GetSize();
|
||||
usz bufsize = builder.GetSize();
|
||||
data.resize(COMMUNICATION_ID_SIZE + sizeof(u32) + bufsize);
|
||||
|
||||
memcpy(data.data(), communication_id.data, COMMUNICATION_ID_SIZE);
|
||||
|
|
@ -855,7 +855,7 @@ bool rpcn_client::search_room(u32 req_id, const SceNpCommunicationId& communicat
|
|||
auto req_finished = s_req.Finish();
|
||||
builder.Finish(req_finished);
|
||||
u8* buf = builder.GetBufferPointer();
|
||||
size_t bufsize = builder.GetSize();
|
||||
usz bufsize = builder.GetSize();
|
||||
data.resize(COMMUNICATION_ID_SIZE + bufsize + sizeof(u32));
|
||||
|
||||
memcpy(data.data(), communication_id.data, COMMUNICATION_ID_SIZE);
|
||||
|
|
@ -910,7 +910,7 @@ bool rpcn_client::set_roomdata_external(u32 req_id, const SceNpCommunicationId&
|
|||
|
||||
builder.Finish(req_finished);
|
||||
u8* buf = builder.GetBufferPointer();
|
||||
size_t bufsize = builder.GetSize();
|
||||
usz bufsize = builder.GetSize();
|
||||
data.resize(COMMUNICATION_ID_SIZE + bufsize + sizeof(u32));
|
||||
|
||||
memcpy(data.data(), communication_id.data, COMMUNICATION_ID_SIZE);
|
||||
|
|
@ -937,7 +937,7 @@ bool rpcn_client::get_roomdata_internal(u32 req_id, const SceNpCommunicationId&
|
|||
|
||||
builder.Finish(req_finished);
|
||||
u8* buf = builder.GetBufferPointer();
|
||||
size_t bufsize = builder.GetSize();
|
||||
usz bufsize = builder.GetSize();
|
||||
data.resize(COMMUNICATION_ID_SIZE + bufsize + sizeof(u32));
|
||||
|
||||
memcpy(data.data(), communication_id.data, COMMUNICATION_ID_SIZE);
|
||||
|
|
@ -992,7 +992,7 @@ bool rpcn_client::set_roomdata_internal(u32 req_id, const SceNpCommunicationId&
|
|||
|
||||
builder.Finish(req_finished);
|
||||
u8* buf = builder.GetBufferPointer();
|
||||
size_t bufsize = builder.GetSize();
|
||||
usz bufsize = builder.GetSize();
|
||||
data.resize(COMMUNICATION_ID_SIZE + bufsize + sizeof(u32));
|
||||
|
||||
memcpy(data.data(), communication_id.data, COMMUNICATION_ID_SIZE);
|
||||
|
|
@ -1051,7 +1051,7 @@ bool rpcn_client::send_room_message(u32 req_id, const SceNpCommunicationId& comm
|
|||
|
||||
builder.Finish(req_finished);
|
||||
u8* buf = builder.GetBufferPointer();
|
||||
size_t bufsize = builder.GetSize();
|
||||
usz bufsize = builder.GetSize();
|
||||
data.resize(COMMUNICATION_ID_SIZE + bufsize + sizeof(u32));
|
||||
|
||||
memcpy(data.data(), communication_id.data, COMMUNICATION_ID_SIZE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue