mirror of https://github.com/zeldaret/botw.git
Havok: Silence clang-tidy false positive warning for operator new
This commit is contained in:
parent
778e51edb5
commit
80d80d9f48
|
@ -70,6 +70,8 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
#define HK_DECLARE_CLASS_ALLOCATOR_IMPL(CLASS_TYPE, ALLOCATOR) \
|
#define HK_DECLARE_CLASS_ALLOCATOR_IMPL(CLASS_TYPE, ALLOCATOR) \
|
||||||
|
/* clang-tidy fails to understand that the operator delete matches the operator new */ \
|
||||||
|
/* NOLINTNEXTLINE(misc-new-delete-overloads) */ \
|
||||||
HK_FORCE_INLINE void* operator new(hk_size_t nbytes) { \
|
HK_FORCE_INLINE void* operator new(hk_size_t nbytes) { \
|
||||||
if constexpr (std::is_base_of_v<hkReferencedObject, CLASS_TYPE>) { \
|
if constexpr (std::is_base_of_v<hkReferencedObject, CLASS_TYPE>) { \
|
||||||
return hkMemoryRouter::getInstance().ALLOCATOR().blockAlloc(static_cast<int>(nbytes)); \
|
return hkMemoryRouter::getInstance().ALLOCATOR().blockAlloc(static_cast<int>(nbytes)); \
|
||||||
|
|
Loading…
Reference in New Issue