mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Core: Drop custom copymem
/zeromem
defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639
.
There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
Backport of #48239.
This commit is contained in:
parent
1db31d0afa
commit
70ae90e0e8
66 changed files with 173 additions and 242 deletions
|
@ -581,7 +581,7 @@ Error NetworkedMultiplayerENet::put_packet(const uint8_t *p_buffer, int p_buffer
|
|||
ENetPacket *packet = enet_packet_create(NULL, p_buffer_size + 8, packet_flags);
|
||||
encode_uint32(unique_id, &packet->data[0]); // Source ID
|
||||
encode_uint32(target_peer, &packet->data[4]); // Dest ID
|
||||
copymem(&packet->data[8], p_buffer, p_buffer_size);
|
||||
memcpy(&packet->data[8], p_buffer, p_buffer_size);
|
||||
|
||||
if (server) {
|
||||
|
||||
|
@ -705,7 +705,7 @@ size_t NetworkedMultiplayerENet::enet_compress(void *context, const ENetBuffer *
|
|||
while (total) {
|
||||
for (size_t i = 0; i < inBufferCount; i++) {
|
||||
int to_copy = MIN(total, int(inBuffers[i].dataLength));
|
||||
copymem(&enet->src_compressor_mem.write[ofs], inBuffers[i].data, to_copy);
|
||||
memcpy(&enet->src_compressor_mem.write[ofs], inBuffers[i].data, to_copy);
|
||||
ofs += to_copy;
|
||||
total -= to_copy;
|
||||
}
|
||||
|
@ -740,7 +740,7 @@ size_t NetworkedMultiplayerENet::enet_compress(void *context, const ENetBuffer *
|
|||
if (ret > int(outLimit))
|
||||
return 0; // Do not bother
|
||||
|
||||
copymem(outData, enet->dst_compressor_mem.ptr(), ret);
|
||||
memcpy(outData, enet->dst_compressor_mem.ptr(), ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue