From bc2763fc1afbb96d798b8d60853cea1882358e1d Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 11 Jul 2002 15:27:35 +0000 Subject: [PATCH] improved show routine --- src/libCom/cxxTemplates/resourceLib.h | 31 ++++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/libCom/cxxTemplates/resourceLib.h b/src/libCom/cxxTemplates/resourceLib.h index ecf908551..eec59e93a 100644 --- a/src/libCom/cxxTemplates/resourceLib.h +++ b/src/libCom/cxxTemplates/resourceLib.h @@ -388,24 +388,25 @@ void resTable::show ( unsigned level ) const { const unsigned N = this->tableSize (); - printf ( "%u bucket hash table with %u items of type %s installed\n", + printf ( "Hash table with %u buckets and %u items of type %s installed\n", N, this->nInUse, typeid(T).name() ); - if ( N ) { - tsSLList * pList = this->pTable; - while ( pList < & this->pTable[N] ) { - tsSLIter pItem = pList->firstIter (); - while ( pItem.valid () ) { - tsSLIter pNext = pItem; - pNext++; - pItem.pointer()->show ( level ); - pItem = pNext; - } - pList++; - } - } + if ( level >= 1u && N ) { + + if ( level >= 2u ) { + tsSLList * pList = this->pTable; + while ( pList < & this->pTable[N] ) { + tsSLIter pItem = pList->firstIter (); + while ( pItem.valid () ) { + tsSLIter pNext = pItem; + pNext++; + pItem.pointer()->show ( level - 2u ); + pItem = pNext; + } + pList++; + } + } - if ( level >=1u && N ) { double X = 0.0; double XX = 0.0; unsigned maxEntries = 0u;