summaryrefslogtreecommitdiffstats
path: root/src/lib/util/coretmpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util/coretmpl.h')
-rw-r--r--src/lib/util/coretmpl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/util/coretmpl.h b/src/lib/util/coretmpl.h
index 95d8230f565..a06c4fb8a46 100644
--- a/src/lib/util/coretmpl.h
+++ b/src/lib/util/coretmpl.h
@@ -202,7 +202,7 @@ public:
if (m_tail == &toreplace)
m_tail = &object;
object.m_next = toreplace.m_next;
- global_free(&toreplace);
+ delete &toreplace;
return object;
}
return append(object);
@@ -253,7 +253,7 @@ public:
// remove the given object and free its memory
void remove(ElementType &object) noexcept
{
- global_free(&detach(object));
+ delete &detach(object);
}
// find an object by index in the list
@@ -305,7 +305,7 @@ public:
{
ItemType *result = m_freelist.detach_head();
if (result == nullptr)
- result = global_alloc(ItemType);
+ result = new ItemType;
return result;
}