From 21e8705597f8f9eeac20b5cb1d98948b8e25bc8f Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Thu, 19 Oct 2023 18:12:35 -0400 Subject: [PATCH] Don't expose internal match --- LEGO1/mxlist.h | 2 +- LEGO1/mxregion.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LEGO1/mxlist.h b/LEGO1/mxlist.h index 71173643..7da9eb53 100644 --- a/LEGO1/mxlist.h +++ b/LEGO1/mxlist.h @@ -92,7 +92,7 @@ public: MxBool Next(T& p_obj); MxBool Current(T& p_obj); void Advance(); - MxListEntry *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; } diff --git a/LEGO1/mxregion.cpp b/LEGO1/mxregion.cpp index e858f60b..ab1680c5 100644 --- a/LEGO1/mxregion.cpp +++ b/LEGO1/mxregion.cpp @@ -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,19 +151,19 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right) b = a; b.Advance(); - if (a.GetMatch()) { + if (a.HasMatch()) { a.Destroy(); a.Detach(); } - if (!b.Current(leftRight)) + if (!b.Current(leftRight)) break; a = b; } while (leftRight->m_left < p_right); } - if (a.GetMatch()) { + if (a.HasMatch()) { MxRegionLeftRight *copy = new MxRegionLeftRight(p_left, p_right); a.Prepend(copy); }