diff options
author | AndreaCatania <info@andreacatania.com> | 2021-08-11 13:09:54 +0200 |
---|---|---|
committer | AndreaCatania <info@andreacatania.com> | 2021-08-13 10:18:34 +0200 |
commit | 98ceb60eb44766b8c2081fca52047f84508fabfc (patch) | |
tree | 30736d93198b213a2248342f85a21147f35a0762 /thirdparty/etcpak | |
parent | 688228030850005f84d7b51a527bc779d76b905e (diff) |
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));
```
Diffstat (limited to 'thirdparty/etcpak')
0 files changed, 0 insertions, 0 deletions