Refactor MxHashTable/MxVariableTable (#283)

* Refactor MxHashTable/MxVariableTable

* Use MxS8 for Compare return type

* Cursor::DeleteMatch check and clang fix
This commit is contained in:
MS
2023-11-12 19:25:56 -05:00
committed by GitHub
parent 8b2e7a92e1
commit 8861acaf20
5 changed files with 162 additions and 112 deletions

25
LEGO1/mxcollection.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef MXCOLLECTION_H
#define MXCOLLECTION_H
#include "mxcore.h"
template <class T>
class MxCollection : public MxCore {
public:
MxCollection()
{
m_count = 0;
m_customDestructor = Destroy;
}
virtual ~MxCollection() {}
static void Destroy(T){};
virtual MxS8 Compare(T, T) { return 0; }
protected:
MxU32 m_count; // +0x8
void (*m_customDestructor)(T); // +0xc
};
#endif // MXCOLLECTION_H