You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +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.
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
#ifndef PACKET_BUFFER_H
|
||||
#define PACKET_BUFFER_H
|
||||
|
||||
#include "core/os/copymem.h"
|
||||
#include "core/templates/ring_buffer.h"
|
||||
|
||||
template <class T>
|
||||
@@ -66,7 +65,7 @@ public:
|
||||
if (p_info) {
|
||||
_Packet p;
|
||||
p.size = p_size;
|
||||
copymem(&p.info, p_info, sizeof(T));
|
||||
memcpy(&p.info, p_info, sizeof(T));
|
||||
_packets.write(p);
|
||||
}
|
||||
|
||||
@@ -86,7 +85,7 @@ public:
|
||||
ERR_FAIL_COND_V(p_bytes < (int)p.size, ERR_OUT_OF_MEMORY);
|
||||
|
||||
r_read = p.size;
|
||||
copymem(r_info, &p.info, sizeof(T));
|
||||
memcpy(r_info, &p.info, sizeof(T));
|
||||
_payload.read(r_payload, p.size);
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user