You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +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:
@@ -493,9 +493,9 @@ void AudioStreamSample::set_data(const PoolVector<uint8_t> &p_data) {
|
||||
PoolVector<uint8_t>::Read r = p_data.read();
|
||||
int alloc_len = datalen + DATA_PAD * 2;
|
||||
data = AudioServer::get_singleton()->audio_data_alloc(alloc_len); //alloc with some padding for interpolation
|
||||
zeromem(data, alloc_len);
|
||||
memset(data, 0, alloc_len);
|
||||
uint8_t *dataptr = (uint8_t *)data;
|
||||
copymem(dataptr + DATA_PAD, r.ptr(), datalen);
|
||||
memcpy(dataptr + DATA_PAD, r.ptr(), datalen);
|
||||
data_bytes = datalen;
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ PoolVector<uint8_t> AudioStreamSample::get_data() const {
|
||||
|
||||
PoolVector<uint8_t>::Write w = pv.write();
|
||||
uint8_t *dataptr = (uint8_t *)data;
|
||||
copymem(w.ptr(), dataptr + DATA_PAD, data_bytes);
|
||||
memcpy(w.ptr(), dataptr + DATA_PAD, data_bytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user