fixed loop iteration bug in traversal functions

This commit is contained in:
Jeff Hill
2001-02-20 18:47:20 +00:00
parent 66900cefc9
commit 85f5100665
+6 -2
View File
@@ -392,8 +392,10 @@ void resTable<T,ID>::traverse ( void (T::*pCB)() )
while ( pList < &this->pTable[this->hashIdMask+1] ) {
tsSLIter<T> pItem = pList->firstIter ();
while ( pItem.valid () ) {
tsSLIter<T> pNext = pItem;
pNext++;
( pItem.pointer ()->*pCB ) ();
pItem++;
pItem = pNext;
}
pList++;
}
@@ -411,8 +413,10 @@ void resTable<T,ID>::traverseConst ( void (T::*pCB)() const ) const
while ( pList < &this->pTable[this->hashIdMask+1] ) {
tsSLIterConst<T> pItem = pList->firstIter ();
while ( pItem.valid () ) {
tsSLIter<T> pNext = pItem;
pNext++;
( pItem.pointer ()->*pCB ) ();
pItem++;
pItem = pNext;
}
pList++;
}