summaryrefslogtreecommitdiff
path: root/vcl/source/fontsubset
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-28 09:09:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 09:05:39 +0200
commit37f9fdc11c4e95d6a34cb515a454503256a82c63 (patch)
tree35099c65caf4c62451a5b7a7c0bac249473c9733 /vcl/source/fontsubset
parent4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (diff)
replace rtl_allocateMemory with std::malloc
where used directly, since rtl_allocateMemory now just calls into std::malloc Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad Reviewed-on: https://gerrit.libreoffice.org/59685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/fontsubset')
-rw-r--r--vcl/source/fontsubset/list.cxx11
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;
}