use reference to match available code

This commit is contained in:
disinvite 2023-07-13 11:31:08 -04:00
parent 6d3df6f634
commit 6a0bb6ca1c
3 changed files with 7 additions and 7 deletions

View File

@ -56,8 +56,8 @@ class MxHashTable : public MxCore
{
// Save a reference to the current table
// so we can walk nodes and re-insert
MxHashTableNode<T> **old_table = m_slots;
MxU32 old_size = m_numSlots;
MxHashTableNode<T> **old_table = m_slots;
switch (m_resizeOption) {
case HASH_TABLE_OPT_EXPAND_ADD:
@ -156,10 +156,10 @@ class MxHashTableCursor : public MxCore
return m_match != NULL;
}
void GetMatch(T **p_obj)
void GetMatch(T*& p_obj)
{
if (m_match) {
*p_obj = m_match->m_obj;
p_obj = m_match->m_obj;
}
}

View File

@ -28,7 +28,7 @@ void MxVariableTable::SetVariable(const char *p_key, const char *p_value)
if (cursor.Find(var)) {
delete var;
cursor.GetMatch(&var);
cursor.GetMatch(var);
var->SetValue(p_value);
} else {
MxHashTable<MxVariable>::Add(var);
@ -68,7 +68,7 @@ const char *MxVariableTable::GetVariable(const char *p_key)
delete var;
if (found) {
cursor.GetMatch(&var);
cursor.GetMatch(var);
value = var->GetValue()->GetData();
}

View File

@ -11,9 +11,9 @@
class MxVariableTable : protected MxHashTable<MxVariable>
{
public:
__declspec(dllexport) const char * GetVariable(const char *key);
__declspec(dllexport) void SetVariable(MxVariable *var);
__declspec(dllexport) void SetVariable(const char *key, const char *value);
__declspec(dllexport) void SetVariable(MxVariable *var);
__declspec(dllexport) const char * GetVariable(const char *key);
virtual MxS8 Compare(MxVariable *, MxVariable *); // +0x14
virtual MxU32 Hash(MxVariable *); // +0x18