aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-16 17:48:33 -0800
committerChris Robinson <[email protected]>2023-12-16 17:48:33 -0800
commitbc83c874ff15b29fdab9b6c0bf40b268345b3026 (patch)
tree41691ecf41423d015726c334987df70bdf9b5396 /common
parent4fb33be2b4cb548b4116ee4124ba3d8d2bcecb82 (diff)
Remove DEF_NEWDEL
C++17 provides alignment-aware allocators for us, so we don't need to use our own to make sure classes/structs are properly aligned.
Diffstat (limited to 'common')
-rw-r--r--common/almalloc.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/common/almalloc.h b/common/almalloc.h
index b3d8dd58..7ac02bf1 100644
--- a/common/almalloc.h
+++ b/common/almalloc.h
@@ -26,19 +26,6 @@ void *al_calloc(size_t alignment, size_t size);
void operator delete(void*) noexcept = delete; \
void operator delete[](void*) noexcept = delete;
-#define DEF_NEWDEL(T) \
- void *operator new(size_t size) \
- { \
- static_assert(&operator new == &T::operator new, \
- "Incorrect container type specified"); \
- if(void *ret{al_malloc(alignof(T), size)}) \
- return ret; \
- throw std::bad_alloc(); \
- } \
- void *operator new[](size_t size) { return operator new(size); } \
- void operator delete(void *block) noexcept { al_free(block); } \
- void operator delete[](void *block) noexcept { operator delete(block); }
-
#define DEF_PLACE_NEWDEL \
void *operator new(size_t) = delete; \
void *operator new[](size_t) = delete; \