Sync containers with new HashMap/HashSet, sync API headers.

This commit is contained in:
bruvzg
2022-06-06 12:18:07 +03:00
parent 851ec2f923
commit e3119e7d05
10 changed files with 9401 additions and 8094 deletions

View File

@@ -98,6 +98,14 @@ public:
_ALWAYS_INLINE_ static void free(void *p_ptr) { Memory::free_static(p_ptr); }
};
template <class T>
class DefaultTypedAllocator {
public:
template <class... Args>
_ALWAYS_INLINE_ T *new_allocation(const Args &&...p_args) { return memnew(T(p_args...)); }
_ALWAYS_INLINE_ void delete_allocation(T *p_allocation) { memdelete(p_allocation); }
};
template <class T>
void memdelete(T *p_class, typename std::enable_if<!std::is_base_of_v<godot::Wrapped, T>>::type * = 0) {
if (!__has_trivial_destructor(T)) {