kernel_cpp: Move the C++14 operator delete out of the header.
It seems not all of the kernel includes this, but some use new/delete anyway. Further, operator delete[] was not implemented at all. Possibly fixes the ARM build.
This commit is contained in:
parent
cf36277e17
commit
edb6d3b17b
@ -39,13 +39,8 @@ extern void operator delete(void *ptr) _NOEXCEPT;
|
||||
extern void operator delete[](void *ptr) _NOEXCEPT;
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
inline void
|
||||
operator delete(void *ptr, size_t size) throw ()
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
extern void operator delete(void* ptr, std::size_t) _NOEXCEPT;
|
||||
extern void operator delete[](void* ptr, std::size_t) _NOEXCEPT;
|
||||
#endif // __cplusplus >= 201402L
|
||||
|
||||
#endif // #if _KERNEL_MODE
|
||||
|
@ -141,6 +141,25 @@ operator delete[](void *ptr) _NOEXCEPT
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
void
|
||||
operator delete(void* ptr, std::size_t) _NOEXCEPT
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
operator delete[](void* ptr, std::size_t) _NOEXCEPT
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef _BOOT_MODE
|
||||
|
||||
FILE *stderr = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user