98ceb60eb4
With this commit the macro `memnew_placement` uses the standard memory placement syntax: `new (mem) TheClass()`, and removes the outdated and not used syntax: ``` _ALWAYS_INLINE_ void *operator new(size_t p_size, void *p_pointer, size_t check, const char *p_description) { ``` Thanks to this change, the function `memnew_placement` call is compatible with any class, and can also initialize classes with non-empty constructor: ``` // This is valid, like before. memnew_placement(mem, Variant); // This works too: memnew_placement(mem, Variant(123)); ``` |
||
---|---|---|
.. | ||
android | ||
doc_classes | ||
gdnative | ||
icons | ||
include | ||
nativescript | ||
net | ||
pluginscript | ||
tests | ||
text | ||
videodecoder | ||
xr | ||
config.py | ||
gdnative.cpp | ||
gdnative.h | ||
gdnative_api.json | ||
gdnative_builders.py | ||
gdnative_library_editor_plugin.cpp | ||
gdnative_library_editor_plugin.h | ||
gdnative_library_singleton_editor.cpp | ||
gdnative_library_singleton_editor.h | ||
register_types.cpp | ||
register_types.h | ||
SCsub |