mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-11 15:16:27 +01:00
Same custom over-aligned allocation routine on all platforms...
... in particular so that warnings on exit in the debug build on Windows are suppressed. Maybe it's not important to suppress them. Or maybe they suggest all is not correct in the MSVC implementation of this C++17 feature?
This commit is contained in:
committed by
Panagiotis Vasilopoulos
parent
f58e132bb2
commit
7e2b7e68ad
@@ -594,10 +594,21 @@ struct UTILITY_API alignas(
|
||||
64 /* ? */
|
||||
#endif
|
||||
)
|
||||
|
||||
NonInterferingBase {
|
||||
#ifdef __APPLE__
|
||||
static void *operator new(std::size_t count, std::align_val_t al);
|
||||
static void operator delete(void *ptr, std::align_val_t al);
|
||||
|
||||
#if defined (_MSC_VER) && defined(_DEBUG)
|
||||
// Versions that work in the presence of the DEBUG_NEW macro.
|
||||
// Ignore the arguments supplied by the macro and forward to the
|
||||
// other overloads.
|
||||
static void *operator new(
|
||||
std::size_t count, std::align_val_t al, int, const char *, int)
|
||||
{ return operator new(count, al); }
|
||||
static void operator delete(
|
||||
void *ptr, std::align_val_t al, int, const char *, int)
|
||||
{ return operator delete(ptr, al); }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user