mirror of https://github.com/godotengine/godot
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));
```
|
||
|---|---|---|
| .. | ||
| aabb.cpp | ||
| array.cpp | ||
| basis.cpp | ||
| callable.cpp | ||
| color.cpp | ||
| dictionary.cpp | ||
| gdnative.cpp | ||
| node_path.cpp | ||
| packed_arrays.cpp | ||
| plane.cpp | ||
| quaternion.cpp | ||
| rect2.cpp | ||
| rid.cpp | ||
| signal.cpp | ||
| string.cpp | ||
| string_name.cpp | ||
| transform2d.cpp | ||
| transform_3d.cpp | ||
| variant.cpp | ||
| vector2.cpp | ||
| vector3.cpp | ||