mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:08:10 +00:00
AK: Add operator delete stub to all AK_MAKE_ETERNAL objects
Static analysis correctly flags that we are missing an implementation for `operator delete` for all classes which are annotated with AK_MAKE_ETERNAL. To appease static analysis define an implementation which asserts to make sure no one ever calls delete on the object.
This commit is contained in:
parent
ab07d8bbf0
commit
1f68b1f768
1 changed files with 1 additions and 0 deletions
|
@ -42,6 +42,7 @@ inline size_t malloc_good_size(size_t size) { return size; }
|
|||
# define AK_MAKE_ETERNAL \
|
||||
public: \
|
||||
void* operator new(size_t size) { return kmalloc_eternal(size); } \
|
||||
void operator delete(void*, size_t) { VERIFY_NOT_REACHED(); } \
|
||||
\
|
||||
private:
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue