diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-03-07 20:29:49 -0600 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-03-07 22:39:09 -0600 |
commit | 9903e6779b70fc03aae70a37b9cf053f4f355b91 (patch) | |
tree | 16ee7fbb98471ff6b4f3ea97e9a9389ae33282ea /core/os/memory.h | |
parent | aef11a14274f6f9e74ad91ead1d7c07ea1dd7f5f (diff) | |
download | redot-engine-9903e6779b70fc03aae70a37b9cf053f4f355b91.tar.gz |
Enforce template syntax `typename` over `class`
Diffstat (limited to 'core/os/memory.h')
-rw-r--r-- | core/os/memory.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/os/memory.h b/core/os/memory.h index 6f3f6fed39..d03e08d785 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -92,7 +92,7 @@ void operator delete(void *p_mem, void *p_pointer, size_t check, const char *p_d _ALWAYS_INLINE_ void postinitialize_handler(void *) {} -template <class T> +template <typename T> _ALWAYS_INLINE_ T *_post_initialize(T *p_obj) { postinitialize_handler(p_obj); return p_obj; @@ -107,7 +107,7 @@ _ALWAYS_INLINE_ bool predelete_handler(void *) { return true; } -template <class T> +template <typename T> void memdelete(T *p_class) { if (!predelete_handler(p_class)) { return; // doesn't want to be deleted @@ -119,7 +119,7 @@ void memdelete(T *p_class) { Memory::free_static(p_class, false); } -template <class T, class A> +template <typename T, typename A> void memdelete_allocator(T *p_class) { if (!predelete_handler(p_class)) { return; // doesn't want to be deleted @@ -213,10 +213,10 @@ struct _GlobalNilClass { static _GlobalNil _nil; }; -template <class T> +template <typename T> class DefaultTypedAllocator { public: - template <class... Args> + template <typename... Args> _FORCE_INLINE_ T *new_allocation(const Args &&...p_args) { return memnew(T(p_args...)); } _FORCE_INLINE_ void delete_allocation(T *p_allocation) { memdelete(p_allocation); } }; |