You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +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:
@@ -32,7 +32,6 @@
|
||||
#define CALLABLE_METHOD_POINTER_H
|
||||
|
||||
#include "core/object/object.h"
|
||||
#include "core/os/copymem.h"
|
||||
#include "core/templates/hashfuncs.h"
|
||||
#include "core/templates/simple_type.h"
|
||||
#include "core/variant/binder_common.h"
|
||||
@@ -98,7 +97,7 @@ public:
|
||||
}
|
||||
|
||||
CallableCustomMethodPointer(T *p_instance, void (T::*p_method)(P...)) {
|
||||
zeromem(&data, sizeof(Data)); // Clear beforehand, may have padding bytes.
|
||||
memset(&data, 0, sizeof(Data)); // Clear beforehand, may have padding bytes.
|
||||
data.instance = p_instance;
|
||||
#ifdef DEBUG_ENABLED
|
||||
data.object_id = p_instance->get_instance_id();
|
||||
@@ -153,7 +152,7 @@ public:
|
||||
}
|
||||
|
||||
CallableCustomMethodPointerRet(T *p_instance, R (T::*p_method)(P...)) {
|
||||
zeromem(&data, sizeof(Data)); // Clear beforehand, may have padding bytes.
|
||||
memset(&data, 0, sizeof(Data)); // Clear beforehand, may have padding bytes.
|
||||
data.instance = p_instance;
|
||||
#ifdef DEBUG_ENABLED
|
||||
data.object_id = p_instance->get_instance_id();
|
||||
@@ -208,7 +207,7 @@ public:
|
||||
}
|
||||
|
||||
CallableCustomMethodPointerRetC(T *p_instance, R (T::*p_method)(P...) const) {
|
||||
zeromem(&data, sizeof(Data)); // Clear beforehand, may have padding bytes.
|
||||
memset(&data, 0, sizeof(Data)); // Clear beforehand, may have padding bytes.
|
||||
data.instance = p_instance;
|
||||
#ifdef DEBUG_ENABLED
|
||||
data.object_id = p_instance->get_instance_id();
|
||||
|
||||
Reference in New Issue
Block a user