From ff0be2e45975c1d1f83e4ea525bbac152ccc9b82 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 26 Sep 2023 06:17:51 -0400 Subject: [PATCH] Add template compare annotations for MxList instances --- LEGO1/mxdsactionlist.h | 9 +++++++++ LEGO1/mxlist.h | 9 ++------- LEGO1/mxnotificationmanager.cpp | 11 ----------- LEGO1/mxpresenterlist.h | 9 +++++++++ 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/LEGO1/mxdsactionlist.h b/LEGO1/mxdsactionlist.h index 4ae6e2a6..127dd142 100644 --- a/LEGO1/mxdsactionlist.h +++ b/LEGO1/mxdsactionlist.h @@ -25,4 +25,13 @@ class MxDSActionList : public MxList typedef MxListCursorChild MxDSActionListCursor; +// OFFSET: LEGO1 0x100c9d20 TEMPLATE +// MxListParent::Destroy + +// OFFSET: LEGO1 0x100c9cd0 TEMPLATE +// MxListParent::~MxListParent + +// OFFSET: LEGO1 0x100c9d30 TEMPLATE +// MxList::~MxList + #endif // MXDSACTIONLIST_H diff --git a/LEGO1/mxlist.h b/LEGO1/mxlist.h index 0de71903..ed4c2802 100644 --- a/LEGO1/mxlist.h +++ b/LEGO1/mxlist.h @@ -31,15 +31,11 @@ class MxListParent : public MxCore m_count = 0; m_customDestructor = Destroy; } - // OFFSET: LEGO1 0x1001cdd0 + virtual ~MxListParent() {} - - // OFFSET: LEGO1 0x1001cd30 - static void Destroy(T *) {}; - - // OFFSET: LEGO1 0x1001cd20 virtual MxS8 Compare(T *, T *) = 0; + static void Destroy(T *) {}; protected: MxU32 m_count; // +0x8 void (*m_customDestructor)(T *); // +0xc @@ -114,7 +110,6 @@ class MxListCursorChildChild : public MxListCursorChild }; template -// OFFSET: LEGO1 0x1001ce20 MxList::~MxList() { DeleteAll(); diff --git a/LEGO1/mxnotificationmanager.cpp b/LEGO1/mxnotificationmanager.cpp index d7b066e1..1b097067 100644 --- a/LEGO1/mxnotificationmanager.cpp +++ b/LEGO1/mxnotificationmanager.cpp @@ -8,17 +8,6 @@ #include "compat.h" #include "decomp.h" -// OFFSET: LEGO1 0x100ac320 TEMPLATE -// list >::~list > - -// FIXME: Example of template compare functionality, remove before merging. -#include "mxstl.h" -#include -void make_a_list() { - List l; - cout << l.size(); -} - DECOMP_SIZE_ASSERT(MxNotification, 0x8); DECOMP_SIZE_ASSERT(MxNotificationManager, 0x40); diff --git a/LEGO1/mxpresenterlist.h b/LEGO1/mxpresenterlist.h index 5b36e2d8..71a7f9aa 100644 --- a/LEGO1/mxpresenterlist.h +++ b/LEGO1/mxpresenterlist.h @@ -26,4 +26,13 @@ class MxPresenterList : public MxPresenterListParent typedef MxListCursorChildChild MxPresenterListCursor; +// OFFSET: LEGO1 0x1001cd30 TEMPLATE +// MxListParent::Destroy + +// OFFSET: LEGO1 0x1001cdd0 TEMPLATE +// MxListParent::~MxListParent + +// OFFSET: LEGO1 0x1001ce20 TEMPLATE +// MxList::~MxList + #endif // MXPRESENTERLIST_H