1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-29 16:16:38 +00:00
Files
godot/core/os
AndreaCatania 98ceb60eb4 Refactors the memnew_placement.
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));
```
2021-08-13 10:18:34 +02:00
..
2021-08-13 10:18:34 +02:00
2021-01-01 20:19:21 +01:00
2021-01-01 20:19:21 +01:00
2021-08-06 11:03:26 +02:00
2021-01-19 11:53:10 +01:00
2021-06-11 09:32:39 -04:00
2021-06-11 09:32:39 -04:00