Rename list functions

This commit is contained in:
Christian Semmler 2024-01-05 19:36:08 -05:00
parent eb1952b5dc
commit c9bbc8948d
4 changed files with 27 additions and 27 deletions

View File

@ -288,7 +288,7 @@ MxResult LegoVideoManager::Tickle()
m_3dManager->GetLego3DView()->GetDevice()->Update();
}
cursor.Retreat();
cursor.Prev();
while (cursor.Next(presenter))
presenter->PutData();

View File

@ -91,13 +91,13 @@ class MxListCursor : public MxCore {
MxBool Find(T p_obj);
void Detach();
void Destroy();
MxBool Next();
MxBool Next(T& p_obj);
MxBool Prev();
MxBool Prev(T& p_obj);
MxBool Current(T& p_obj);
MxBool First(T& p_obj);
MxBool Last(T& p_obj);
MxBool Advance();
MxBool Retreat();
MxBool HasMatch() { return m_match != NULL; }
void SetValue(T p_obj);
MxBool Head()
@ -223,6 +223,17 @@ inline void MxListCursor<T>::Destroy()
}
}
template <class T>
inline MxBool MxListCursor<T>::Next()
{
if (!m_match)
m_match = m_list->m_first;
else
m_match = m_match->GetNext();
return m_match != NULL;
}
template <class T>
inline MxBool MxListCursor<T>::Next(T& p_obj)
{
@ -237,6 +248,17 @@ inline MxBool MxListCursor<T>::Next(T& p_obj)
return m_match != NULL;
}
template <class T>
inline MxBool MxListCursor<T>::Prev()
{
if (!m_match)
m_match = m_list->m_last;
else
m_match = m_match->GetPrev();
return m_match != NULL;
}
template <class T>
inline MxBool MxListCursor<T>::Prev(T& p_obj)
{
@ -280,28 +302,6 @@ inline MxBool MxListCursor<T>::Last(T& p_obj)
return m_match != NULL;
}
template <class T>
inline MxBool MxListCursor<T>::Advance()
{
if (!m_match)
m_match = m_list->m_first;
else
m_match = m_match->GetNext();
return m_match != NULL;
}
template <class T>
inline MxBool MxListCursor<T>::Retreat()
{
if (!m_match)
m_match = m_list->m_last;
else
m_match = m_match->GetPrev();
return m_match != NULL;
}
template <class T>
inline void MxListCursor<T>::SetValue(T p_obj)
{

View File

@ -99,7 +99,7 @@ void MxLoopingSmkPresenter::RepeatingTickle()
while (cursor.Next(chunk))
chunk->SetTime(chunk->GetTime() + time);
m_cursor->Advance();
m_cursor->Next();
}
MxStreamChunk* chunk;

View File

@ -146,7 +146,7 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right)
p_right = leftRight->GetRight();
b = a;
b.Advance();
b.Next();
a.Destroy();
if (!b.Current(leftRight))