[Project64] Clean up some warnings in CodeSection.cpp

This commit is contained in:
zilmar 2016-12-13 06:19:11 +11:00
parent 43ed20d59c
commit da2804e831
1 changed files with 13 additions and 14 deletions

View File

@ -994,18 +994,17 @@ void CCodeSection::UnlinkParent(CCodeSection * Parent, bool ContinueSection)
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
} }
SECTION_LIST::iterator iter = m_ParentSection.begin(); SECTION_LIST::iterator ParentIter = m_ParentSection.begin();
while (iter != m_ParentSection.end()) while (ParentIter != m_ParentSection.end())
{ {
CCodeSection * ParentIter = *iter; if (*ParentIter == Parent && (Parent->m_ContinueSection != this || Parent->m_JumpSection != this))
if (ParentIter == Parent && (Parent->m_ContinueSection != this || Parent->m_JumpSection != this))
{ {
m_ParentSection.erase(iter); m_ParentSection.erase(ParentIter);
iter = m_ParentSection.begin(); ParentIter = m_ParentSection.begin();
} }
else else
{ {
iter++; ParentIter++;
} }
} }
@ -1026,23 +1025,23 @@ void CCodeSection::UnlinkParent(CCodeSection * Parent, bool ContinueSection)
{ {
for (SECTION_LIST::iterator iter = m_ParentSection.begin(); iter != m_ParentSection.end(); iter++) for (SECTION_LIST::iterator iter = m_ParentSection.begin(); iter != m_ParentSection.end(); iter++)
{ {
CCodeSection * ParentIter = *iter; CCodeSection * CodeSection = *iter;
if (ParentIter->m_ContinueSection == this) if (CodeSection->m_ContinueSection == this)
{ {
if (ParentIter->m_CompiledLocation) if (CodeSection->m_CompiledLocation)
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
} }
ParentIter->m_ContinueSection = NULL; CodeSection->m_ContinueSection = NULL;
} }
if (ParentIter->m_JumpSection == this) if (CodeSection->m_JumpSection == this)
{ {
if (ParentIter->m_CompiledLocation) if (CodeSection->m_CompiledLocation)
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
} }
ParentIter->m_JumpSection = NULL; CodeSection->m_JumpSection = NULL;
} }
} }
bRemove = true; bRemove = true;