more friendly PgfDB::malloc

This commit is contained in:
krangelov
2021-09-08 14:27:52 +02:00
parent 9d63c8a903
commit 44ee5718e9
5 changed files with 17 additions and 21 deletions

View File

@@ -69,13 +69,8 @@ public:
PGF_INTERNAL_DECL ~PgfDB();
template<class A>
static ref<A> malloc() {
return current_db->malloc_internal(sizeof(A));
}
template<class A>
static ref<A> malloc(size_t bytes) {
return current_db->malloc_internal(bytes);
static ref<A> malloc(size_t extra_bytes=0) {
return current_db->malloc_internal(sizeof(A)+extra_bytes);
}
template<class A>