diff options
author | Chris Robinson <[email protected]> | 2018-11-22 07:06:42 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-22 07:06:42 -0800 |
commit | ba8c865513d33019962a02e00ab496365de17abf (patch) | |
tree | 3ee05abc7044873f316003514e0aa0213cc1a41c /Alc/mastering.h | |
parent | ab6db9a589ac5ad8daa498e9fedb4de66cbb1948 (diff) |
Add and use a macro to define placement-new-only allocators
This is for structs that utilize over-allocation, either flexible array
members, or which store optional additional objects in the same allocation
block.
Diffstat (limited to 'Alc/mastering.h')
-rw-r--r-- | Alc/mastering.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Alc/mastering.h b/Alc/mastering.h index a6cf58ed..14111130 100644 --- a/Alc/mastering.h +++ b/Alc/mastering.h @@ -61,9 +61,7 @@ struct Compressor { ALfloat LastAttack; ALfloat LastGainDev; - void *operator new(size_t size) = delete; - void *operator new(size_t /*size*/, void *ptr) noexcept { return ptr; } - void operator delete(void *block) noexcept { al_free(block); } + DEF_PLACE_NEWDEL() }; /* The compressor is initialized with the following settings: |