From d38877a6167ce3599d3532f11629a4ec7cc5776e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 29 Apr 2021 12:34:11 +0200 Subject: [PATCH] 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. Backport of #48239. --- visual_script.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/visual_script.cpp b/visual_script.cpp index 8258515..9ace8e8 100644 --- a/visual_script.cpp +++ b/visual_script.cpp @@ -1680,7 +1680,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p state->flow_stack_pos = flow_stack_pos; state->stack.resize(p_stack_size); state->pass = p_pass; - copymem(state->stack.ptrw(), p_stack, p_stack_size); + memcpy(state->stack.ptrw(), p_stack, p_stack_size); //step 2, run away, return directly r_error.error = Variant::CallError::CALL_OK; @@ -1960,7 +1960,7 @@ Variant VisualScriptInstance::call(const StringName &p_method, const Variant **p sequence_bits[i] = false; //all starts as false } - zeromem(pass_stack, f->pass_stack_size * sizeof(int)); + memset(pass_stack, 0, f->pass_stack_size * sizeof(int)); Map::Element *E = instances.find(f->node); if (!E) {