@ -155,7 +155,7 @@ int main(int argc, char* argv[])
class plSoundBufferCollector : public plRegistryPageIterator , public plKeyCollector
class plSoundBufferCollector : public plRegistryPageIterator , public plKeyCollector
{
{
public :
public :
plSoundBufferCollector ( hsTArray < plKey > & keyArray )
plSoundBufferCollector ( std : : set < plKey > & keyArray )
: plKeyCollector ( keyArray ) { }
: plKeyCollector ( keyArray ) { }
hsBool EatPage ( plRegistryPageNode * page )
hsBool EatPage ( plRegistryPageNode * page )
@ -169,14 +169,14 @@ public:
bool DumpSounds ( )
bool DumpSounds ( )
{
{
hsTArray < plKey > soundKeys ;
std : : set < plKey > soundKeys ;
plSoundBufferCollector soundCollector ( soundKeys ) ;
plSoundBufferCollector soundCollector ( soundKeys ) ;
gResMgr - > IterateAllPages ( & soundCollector ) ;
gResMgr - > IterateAllPages ( & soundCollector ) ;
for ( int i = 0 ; i < soundKeys . GetCount ( ) ; i + + )
for ( std : : set < plKey > : : iterator it = soundKeys . begin ( ) ; it ! = soundKeys . end ( ) ; + + it )
{
{
plSoundBuffer * buffer = plSoundBuffer : : ConvertNoRef ( soundKeys [ i ] - > VerifyLoaded ( ) ) ;
plSoundBuffer * buffer = plSoundBuffer : : ConvertNoRef ( ( * it ) - > VerifyLoaded ( ) ) ;
if ( buffer )
if ( buffer )
{
{
// Ref it...
// Ref it...
@ -207,7 +207,7 @@ bool DumpSounds()
}
}
}
}
soundKeys . Reset ( ) ;
soundKeys . clear ( ) ;
plIndirectUnloadIterator iter ;
plIndirectUnloadIterator iter ;
gResMgr - > IterateAllPages ( & iter ) ;
gResMgr - > IterateAllPages ( & iter ) ;
@ -267,4 +267,4 @@ bool DumpStats(const char* patchDir)
plStatDumpIterator statDump ( patchDir ) ;
plStatDumpIterator statDump ( patchDir ) ;
gResMgr - > IterateAllPages ( & statDump ) ;
gResMgr - > IterateAllPages ( & statDump ) ;
return true ;
return true ;
}
}