mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Don't expose internal match
This commit is contained in:
@@ -92,7 +92,7 @@ public:
|
|||||||
MxBool Next(T& p_obj);
|
MxBool Next(T& p_obj);
|
||||||
MxBool Current(T& p_obj);
|
MxBool Current(T& p_obj);
|
||||||
void Advance();
|
void Advance();
|
||||||
MxListEntry<T> *GetMatch() { return m_match; }
|
MxBool HasMatch() { return m_match != NULL; }
|
||||||
void SetValue(T p_obj);
|
void SetValue(T p_obj);
|
||||||
void Head() { m_match = m_list->m_first; }
|
void Head() { m_match = m_list->m_first; }
|
||||||
void Reset() { m_match = NULL; }
|
void Reset() { m_match = NULL; }
|
||||||
|
@@ -134,7 +134,7 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right)
|
|||||||
MxRegionLeftRight *leftRight;
|
MxRegionLeftRight *leftRight;
|
||||||
while (a.Next(leftRight) && leftRight->m_right < p_left);
|
while (a.Next(leftRight) && leftRight->m_right < p_left);
|
||||||
|
|
||||||
if (!a.GetMatch()) {
|
if (!a.HasMatch()) {
|
||||||
MxRegionLeftRight *copy = new MxRegionLeftRight(p_left, p_right);
|
MxRegionLeftRight *copy = new MxRegionLeftRight(p_left, p_right);
|
||||||
m_leftRightList->OtherAppend(copy);
|
m_leftRightList->OtherAppend(copy);
|
||||||
}
|
}
|
||||||
@@ -151,19 +151,19 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right)
|
|||||||
b = a;
|
b = a;
|
||||||
b.Advance();
|
b.Advance();
|
||||||
|
|
||||||
if (a.GetMatch()) {
|
if (a.HasMatch()) {
|
||||||
a.Destroy();
|
a.Destroy();
|
||||||
a.Detach();
|
a.Detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!b.Current(leftRight))
|
if (!b.Current(leftRight))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
a = b;
|
a = b;
|
||||||
} while (leftRight->m_left < p_right);
|
} while (leftRight->m_left < p_right);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a.GetMatch()) {
|
if (a.HasMatch()) {
|
||||||
MxRegionLeftRight *copy = new MxRegionLeftRight(p_left, p_right);
|
MxRegionLeftRight *copy = new MxRegionLeftRight(p_left, p_right);
|
||||||
a.Prepend(copy);
|
a.Prepend(copy);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user