diff options
Diffstat (limited to 'core/os/memory.h')
-rw-r--r-- | core/os/memory.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/core/os/memory.h b/core/os/memory.h index 03c6a80e89..42723152e4 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -41,7 +41,6 @@ #endif class Memory { - Memory(); #ifdef DEBUG_ENABLED static uint64_t mem_usage; @@ -87,7 +86,6 @@ _ALWAYS_INLINE_ void postinitialize_handler(void *) {} template <class T> _ALWAYS_INLINE_ T *_post_initialize(T *p_obj) { - postinitialize_handler(p_obj); return p_obj; } @@ -110,7 +108,6 @@ _ALWAYS_INLINE_ bool predelete_handler(void *) { template <class T> void memdelete(T *p_class) { - if (!predelete_handler(p_class)) return; // doesn't want to be deleted if (!__has_trivial_destructor(T)) @@ -121,7 +118,6 @@ void memdelete(T *p_class) { template <class T, class A> void memdelete_allocator(T *p_class) { - if (!predelete_handler(p_class)) return; // doesn't want to be deleted if (!__has_trivial_destructor(T)) @@ -140,7 +136,6 @@ void memdelete_allocator(T *p_class) { template <typename T> T *memnew_arr_template(size_t p_elements, const char *p_descr = "") { - if (p_elements == 0) return nullptr; /** overloading operator new[] cannot be done , because it may not return the real allocated address (it may pad the 'element count' before the actual array). Because of that, it must be done by hand. This is the @@ -171,14 +166,12 @@ T *memnew_arr_template(size_t p_elements, const char *p_descr = "") { template <typename T> size_t memarr_len(const T *p_class) { - uint64_t *ptr = (uint64_t *)p_class; return *(ptr - 1); } template <typename T> void memdelete_arr(T *p_class) { - uint64_t *ptr = (uint64_t *)p_class; if (!__has_trivial_destructor(T)) { @@ -193,7 +186,6 @@ void memdelete_arr(T *p_class) { } struct _GlobalNil { - int color = 1; _GlobalNil *right; _GlobalNil *left; @@ -203,7 +195,6 @@ struct _GlobalNil { }; struct _GlobalNilClass { - static _GlobalNil _nil; }; |