Don't expose internal match

This commit is contained in:
Christian Semmler
2023-10-19 18:12:35 -04:00
parent 2edc1fd961
commit 21e8705597
2 changed files with 5 additions and 5 deletions

View File

@@ -92,7 +92,7 @@ public:
MxBool Next(T& p_obj);
MxBool Current(T& p_obj);
void Advance();
MxListEntry<T> *GetMatch() { return m_match; }
MxBool HasMatch() { return m_match != NULL; }
void SetValue(T p_obj);
void Head() { m_match = m_list->m_first; }
void Reset() { m_match = NULL; }

View File

@@ -134,7 +134,7 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right)
MxRegionLeftRight *leftRight;
while (a.Next(leftRight) && leftRight->m_right < p_left);
if (!a.GetMatch()) {
if (!a.HasMatch()) {
MxRegionLeftRight *copy = new MxRegionLeftRight(p_left, p_right);
m_leftRightList->OtherAppend(copy);
}
@@ -151,7 +151,7 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right)
b = a;
b.Advance();
if (a.GetMatch()) {
if (a.HasMatch()) {
a.Destroy();
a.Detach();
}
@@ -163,7 +163,7 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right)
} while (leftRight->m_left < p_right);
}
if (a.GetMatch()) {
if (a.HasMatch()) {
MxRegionLeftRight *copy = new MxRegionLeftRight(p_left, p_right);
a.Prepend(copy);
}