From 8247667a3ee0d86f26094e722497b0cbb99cc12b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 27 Apr 2021 16:19:21 +0200 Subject: Core: Drop custom `copymem`/`zeromem` defines We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. 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. --- modules/lightmapper_rd/lightmapper_rd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/lightmapper_rd') diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp index 61ebabdfb6..9394e5c47e 100644 --- a/modules/lightmapper_rd/lightmapper_rd.cpp +++ b/modules/lightmapper_rd/lightmapper_rd.cpp @@ -432,10 +432,10 @@ void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i triangle_indices.resize(triangle_sort.size()); Vector grid_indices; grid_indices.resize(grid_size * grid_size * grid_size * 2); - zeromem(grid_indices.ptrw(), grid_indices.size() * sizeof(uint32_t)); + memset(grid_indices.ptrw(), 0, grid_indices.size() * sizeof(uint32_t)); Vector solid; solid.resize(grid_size * grid_size * grid_size); - zeromem(solid.ptrw(), solid.size() * sizeof(bool)); + memset(solid.ptrw(), 0, solid.size() * sizeof(bool)); { uint32_t *tiw = triangle_indices.ptrw(); @@ -1674,7 +1674,7 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d if (probe_positions.size() > 0) { probe_values.resize(probe_positions.size() * 9); Vector probe_data = rd->buffer_get_data(light_probe_buffer); - copymem(probe_values.ptrw(), probe_data.ptr(), probe_data.size()); + memcpy(probe_values.ptrw(), probe_data.ptr(), probe_data.size()); rd->free(light_probe_buffer); #ifdef DEBUG_TEXTURES @@ -1743,7 +1743,7 @@ Vector LightmapperRD::get_bake_probe_sh(int p_probe) const { ERR_FAIL_INDEX_V(p_probe, probe_positions.size(), Vector()); Vector ret; ret.resize(9); - copymem(ret.ptrw(), &probe_values[p_probe * 9], sizeof(Color) * 9); + memcpy(ret.ptrw(), &probe_values[p_probe * 9], sizeof(Color) * 9); return ret; } -- cgit v1.2.3