Match ~MxList<T>

This commit is contained in:
Christian Semmler 2023-09-13 07:33:36 -04:00
parent 128c44afb6
commit 1734ab5bc4

View File

@ -30,6 +30,8 @@ class MxListParent : public MxCore
m_count = 0; m_count = 0;
m_customDestructor = Destroy; m_customDestructor = Destroy;
} }
// OFFSET: LEGO1 0x1001cdd0
virtual ~MxListParent() {}
// OFFSET: LEGO1 0x1001cd30 // OFFSET: LEGO1 0x1001cd30
static void Destroy(T *) {}; static void Destroy(T *) {};
@ -60,12 +62,13 @@ class MxList : protected MxListParent<T>
}; };
template <class T> template <class T>
// OFFSET: LEGO1 0x1001cfe0 // OFFSET: LEGO1 0x1001ce20
MxList<T>::~MxList() MxList<T>::~MxList()
{ {
MxListEntry<T> *t = m_first; for (MxListEntry<T> *t = m_first;;) {
if (!t)
break;
while (t) {
MxListEntry<T> *next = t->m_next; MxListEntry<T> *next = t->m_next;
m_customDestructor(t->m_obj); m_customDestructor(t->m_obj);
delete t; delete t;