diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/cpu_particles_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/soft_body_3d.cpp | 4 | ||||
-rw-r--r-- | scene/main/http_request.cpp | 2 | ||||
-rw-r--r-- | scene/resources/audio_stream_sample.cpp | 6 | ||||
-rw-r--r-- | scene/resources/bit_map.cpp | 2 | ||||
-rw-r--r-- | scene/resources/surface_tool.cpp | 2 | ||||
-rw-r--r-- | scene/resources/texture.cpp | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index 5f2efeb8ca..1578643d14 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -976,7 +976,7 @@ void CPUParticles2D::_update_particle_data_buffer() { ptr[7] = t.elements[2][1]; } else { - zeromem(ptr, sizeof(float) * 8); + memset(ptr, 0, sizeof(float) * 8); } Color c = r[idx].color; @@ -1080,7 +1080,7 @@ void CPUParticles2D::_notification(int p_what) { ptr[7] = t.elements[2][1]; } else { - zeromem(ptr, sizeof(float) * 8); + memset(ptr, 0, sizeof(float) * 8); } ptr += 16; diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index 780773bb57..aa29728c73 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -1050,7 +1050,7 @@ void CPUParticles3D::_update_particle_data_buffer() { ptr[10] = t.basis.elements[2][2]; ptr[11] = t.origin.z; } else { - zeromem(ptr, sizeof(float) * 12); + memset(ptr, 0, sizeof(float) * 12); } Color c = r[idx].color; @@ -1155,7 +1155,7 @@ void CPUParticles3D::_notification(int p_what) { ptr[10] = t.basis.elements[2][2]; ptr[11] = t.origin.z; } else { - zeromem(ptr, sizeof(float) * 12); + memset(ptr, 0, sizeof(float) * 12); } ptr += 20; diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp index 98ac6aa65e..9a7984b06a 100644 --- a/scene/3d/soft_body_3d.cpp +++ b/scene/3d/soft_body_3d.cpp @@ -85,11 +85,11 @@ void SoftBodyRenderingServerHandler::commit_changes() { } void SoftBodyRenderingServerHandler::set_vertex(int p_vertex_id, const void *p_vector3) { - copymem(&write_buffer[p_vertex_id * stride + offset_vertices], p_vector3, sizeof(float) * 3); + memcpy(&write_buffer[p_vertex_id * stride + offset_vertices], p_vector3, sizeof(float) * 3); } void SoftBodyRenderingServerHandler::set_normal(int p_vertex_id, const void *p_vector3) { - copymem(&write_buffer[p_vertex_id * stride + offset_normal], p_vector3, sizeof(float) * 3); + memcpy(&write_buffer[p_vertex_id * stride + offset_normal], p_vector3, sizeof(float) * 3); } void SoftBodyRenderingServerHandler::set_aabb(const AABB &p_aabb) { diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index 64df37654b..08ab71e7fa 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -123,7 +123,7 @@ Error HTTPRequest::request(const String &p_url, const Vector<String> &p_custom_h size_t len = charstr.length(); raw_data.resize(len); uint8_t *w = raw_data.ptrw(); - copymem(w, charstr.ptr(), len); + memcpy(w, charstr.ptr(), len); return request_raw(p_url, p_custom_headers, p_ssl_validate_domain, p_method, raw_data); } diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp index 06a91fb2f8..9a9f019dda 100644 --- a/scene/resources/audio_stream_sample.cpp +++ b/scene/resources/audio_stream_sample.cpp @@ -490,9 +490,9 @@ void AudioStreamSample::set_data(const Vector<uint8_t> &p_data) { const uint8_t *r = p_data.ptr(); int alloc_len = datalen + DATA_PAD * 2; data = memalloc(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, datalen); + memcpy(dataptr + DATA_PAD, r, datalen); data_bytes = datalen; } @@ -507,7 +507,7 @@ Vector<uint8_t> AudioStreamSample::get_data() const { { uint8_t *w = pv.ptrw(); uint8_t *dataptr = (uint8_t *)data; - copymem(w, dataptr + DATA_PAD, data_bytes); + memcpy(w, dataptr + DATA_PAD, data_bytes); } } diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp index 3cc1af59ae..e9bfac3653 100644 --- a/scene/resources/bit_map.cpp +++ b/scene/resources/bit_map.cpp @@ -39,7 +39,7 @@ void BitMap::create(const Size2 &p_size) { width = p_size.width; height = p_size.height; bitmask.resize(((width * height) / 8) + 1); - zeromem(bitmask.ptrw(), bitmask.size()); + memset(bitmask.ptrw(), 0, bitmask.size()); } void BitMap::create_from_image_alpha(const Ref<Image> &p_image, float p_threshold) { diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 3d3900ecc5..c30bd7927d 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -1105,7 +1105,7 @@ void SurfaceTool::optimize_indices_for_cache() { ERR_FAIL_COND(index_array.size() == 0); LocalVector old_index_array = index_array; - zeromem(index_array.ptr(), index_array.size() * sizeof(int)); + memset(index_array.ptr(), 0, index_array.size() * sizeof(int)); optimize_vertex_cache_func((unsigned int *)index_array.ptr(), (unsigned int *)old_index_array.ptr(), old_index_array.size(), vertex_array.size()); } diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index b6a2f24b8b..771365152d 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -410,7 +410,7 @@ Ref<Image> StreamTexture2D::load_image_from_file(FileAccess *f, int p_size_limit Vector<uint8_t> id = mipmap_images[i]->get_data(); int len = id.size(); const uint8_t *r = id.ptr(); - copymem(&wr[ofs], r, len); + memcpy(&wr[ofs], r, len); ofs += len; } } |