made compatible with prev changes
This commit is contained in:
@@ -526,7 +526,7 @@ resTable<T,ID>::~resTable()
|
||||
//
|
||||
template <class T, class ID>
|
||||
inline resTableIter<T,ID>::resTableIter (const resTable<T,ID> &tableIn) :
|
||||
iter ( tableIn.pTable[0].first () ), index (1), table ( tableIn ) {}
|
||||
iter ( tableIn.pTable[0].firstIter () ), index (1), table ( tableIn ) {}
|
||||
|
||||
//
|
||||
// resTableIter<T,ID>::next ()
|
||||
@@ -534,8 +534,8 @@ inline resTableIter<T,ID>::resTableIter (const resTable<T,ID> &tableIn) :
|
||||
template <class T, class ID>
|
||||
T * resTableIter<T,ID>::next ()
|
||||
{
|
||||
if ( this->iter ) {
|
||||
T *p = this->iter;
|
||||
if ( this->iter.valid () ) {
|
||||
T *p = this->iter.pointer ();
|
||||
this->iter++;
|
||||
return p;
|
||||
}
|
||||
@@ -543,9 +543,9 @@ T * resTableIter<T,ID>::next ()
|
||||
if ( this->index >= (1u<<this->table.hashIdNBits) ) {
|
||||
return 0;
|
||||
}
|
||||
this->iter = tsSLIter<T> ( this->table.pTable[this->index++].first () );
|
||||
if ( this->iter ) {
|
||||
T *p = this->iter;
|
||||
this->iter = tsSLIter<T> ( this->table.pTable[this->index++].firstIter () );
|
||||
if ( this->iter.valid () ) {
|
||||
T *p = this->iter.pointer ();
|
||||
this->iter++;
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -78,9 +78,9 @@ int main ()
|
||||
pFredBack->show();
|
||||
}
|
||||
|
||||
tsDLIterConstBD<jane> bdIter ( janeList.first () );
|
||||
tsDLIterBD < jane > bdIter = janeList.firstIter ();
|
||||
i = 0;
|
||||
while ( bdIter ) {
|
||||
while ( bdIter.valid () ) {
|
||||
i++;
|
||||
bdIter++;
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ int main ()
|
||||
|
||||
clk = clock();
|
||||
{
|
||||
tsSLIter <fred> iter ( list.first () );
|
||||
while ( iter ) {
|
||||
tsSLIter <fred> iter ( list.firstIter () );
|
||||
while ( iter.valid () ) {
|
||||
iter->inc ();
|
||||
iter++;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ int main ()
|
||||
pFred = new fred();
|
||||
clk = clock();
|
||||
{
|
||||
tsSLIter <fred> iter ( list.first () );
|
||||
tsSLIter <fred> iter ( list.firstIter () );
|
||||
for ( i=0; i<LOOPCOUNT; i++ ) {
|
||||
iter->inc();
|
||||
}
|
||||
|
||||
@@ -34,12 +34,11 @@ int main ()
|
||||
list.add(*pFred);
|
||||
list.add(*pFredII);
|
||||
{
|
||||
tsSLIter<fred> iter1( pFredII );
|
||||
tsSLIter<fred> iter2( list.first () );
|
||||
tsSLIter<fred> iter3( pFred );
|
||||
assert ( iter1 == iter2 );
|
||||
iter2++;
|
||||
assert ( iter3 == iter2 );
|
||||
tsSLIter<fred> iter1 = list.firstIter ();
|
||||
tsSLIter<fred> iter2 = iter1;
|
||||
tsSLIter<fred> iter3 = iter1;
|
||||
assert ( iter1 == iter3++ );
|
||||
assert ( iter3 == ++iter2 );
|
||||
list.remove ( *pFredII ); // removes pFred
|
||||
}
|
||||
list.add ( *pFred );
|
||||
@@ -58,8 +57,8 @@ int main ()
|
||||
list.add(* new fred("D"));
|
||||
|
||||
{
|
||||
tsSLIter<fred> iter ( list.first() );
|
||||
while ( iter ) {
|
||||
tsSLIter < fred > iter = list.firstIter();
|
||||
while ( iter.valid () ) {
|
||||
iter->show();
|
||||
++iter;
|
||||
}
|
||||
@@ -71,17 +70,17 @@ int main ()
|
||||
janeList.add(*pJane);
|
||||
|
||||
{
|
||||
tsSLIter<jane> iter ( janeList.first() );
|
||||
while ( iter ) {
|
||||
tsSLIter < jane > iter = janeList.firstIter ();
|
||||
while ( iter.valid () ) {
|
||||
iter->show();
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
tsSLIter <fred> iter ( list.first () );
|
||||
while ( iter ) {
|
||||
iter->show();
|
||||
tsSLIter < fred > iter = list.firstIter ();
|
||||
while ( iter.valid () ) {
|
||||
iter->show ();
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
@@ -89,8 +88,8 @@ int main ()
|
||||
while ( list.get () );
|
||||
|
||||
{
|
||||
tsSLIter<fred> iter (list.first());
|
||||
assert ( ! iter );
|
||||
tsSLIter < fred > iter = list.firstIter ();
|
||||
assert ( ! iter.valid () );
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -421,7 +421,7 @@ int tsDLList < T > :: find ( const T &item ) const
|
||||
tsDLIterConstBD < T > iter ( this->first () );
|
||||
int itemNo = 0;
|
||||
|
||||
while ( iter ) {
|
||||
while ( iter.valid () ) {
|
||||
if ( iter == thisItem ) {
|
||||
return itemNo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user