diff options
author | Bastiaan Olij <mux213@gmail.com> | 2021-08-28 14:59:09 +1000 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2021-09-27 23:08:09 +1000 |
commit | b07559882cbee3012578971c01cd32c9e9bd7964 (patch) | |
tree | 78f8d9b4c73a499ac3edd0d4054b6a1f220ec109 /include/godot_cpp/core/memory.hpp | |
parent | dd72ce151a6ee10f8045e233d3ac8bf521d7e5d4 (diff) | |
download | redot-cpp-b07559882cbee3012578971c01cd32c9e9bd7964.tar.gz |
Silence delete compile warning in memory.h/cpp on Windows
Diffstat (limited to 'include/godot_cpp/core/memory.hpp')
-rw-r--r-- | include/godot_cpp/core/memory.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/godot_cpp/core/memory.hpp b/include/godot_cpp/core/memory.hpp index 34d9079..d95ca40 100644 --- a/include/godot_cpp/core/memory.hpp +++ b/include/godot_cpp/core/memory.hpp @@ -44,6 +44,14 @@ _ALWAYS_INLINE_ void *operator new(size_t p_size, void *p_pointer, size_t check, return p_pointer; } +#ifdef _MSC_VER +// When compiling with VC++ 2017, the above declarations of placement new generate many irrelevant warnings (C4291). +// The purpose of the following definitions is to muffle these warnings, not to provide a usable implementation of placement delete. +void operator delete(void *p_mem, const char *p_description); +void operator delete(void *p_mem, void *(*p_allocfunc)(size_t p_size)); +void operator delete(void *p_mem, void *p_pointer, size_t check, const char *p_description); +#endif + namespace godot { class Memory { |