diff options
Diffstat (limited to 'vcl/source/fontsubset/list.cxx')
-rw-r--r-- | vcl/source/fontsubset/list.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/source/fontsubset/list.cxx b/vcl/source/fontsubset/list.cxx index aab4bf40d2f6..986cf5eb2633 100644 --- a/vcl/source/fontsubset/list.cxx +++ b/vcl/source/fontsubset/list.cxx @@ -27,6 +27,7 @@ #include <rtl/alloc.h> #include <assert.h> +#include <cstdlib> #include "list.h" @@ -49,7 +50,7 @@ struct list_ { static lnode *newNode(void *el) { - lnode *ptr = static_cast<lnode *>(rtl_allocateMemory(sizeof(lnode))); + lnode *ptr = static_cast<lnode *>(std::malloc(sizeof(lnode))); assert(ptr != nullptr); ptr->value = el; @@ -84,7 +85,7 @@ static lnode *appendPrim(list pThis, void *el) /*- public methods */ list listNewEmpty() /*- default ctor */ { - list pThis = static_cast<list>(rtl_allocateMemory(sizeof(struct list_))); + list pThis = static_cast<list>(std::malloc(sizeof(struct list_))); assert(pThis != nullptr); pThis->aCount = 0; @@ -98,7 +99,7 @@ void listDispose(list pThis) /*- dtor */ { assert(pThis != nullptr); listClear(pThis); - rtl_freeMemory(pThis); + std::free(pThis); } void listSetElementDtor(list pThis, list_destructor f) @@ -199,7 +200,7 @@ list listRemove(list pThis) if (pThis->eDtor) pThis->eDtor(pThis->cptr->value); /* call the dtor callback */ - rtl_freeMemory(pThis->cptr); + std::free(pThis->cptr); pThis->aCount--; pThis->cptr = ptr; return pThis; @@ -212,7 +213,7 @@ list listClear(list pThis) while (node) { ptr = node->next; if (pThis->eDtor) pThis->eDtor(node->value); /* call the dtor callback */ - rtl_freeMemory(node); + std::free(node); pThis->aCount--; node = ptr; } |