From 6e0a17d42c09d2cde5f6756a94ab401de0bcb76d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 15 Nov 2004 05:15:51 +0000 Subject: [PATCH] hack to not confuse GetCopies no longer needed --- stepmania/src/RageSoundManager.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/stepmania/src/RageSoundManager.cpp b/stepmania/src/RageSoundManager.cpp index c15f36d69c..9e15cfed1a 100644 --- a/stepmania/src/RageSoundManager.cpp +++ b/stepmania/src/RageSoundManager.cpp @@ -96,18 +96,6 @@ void RageSoundManager::Update(float delta) ToDelete.insert( *it ); } - /* Don't delete any sounds that are the parent of another sound. Always delete - * child sounds first. Otherwise, another sound might be allocated that has the - * same pointer as an old, deleted parent, and since we use the pointer to the - * parent to determine which sounds share the same parent, it'll confuse GetCopies(). */ - for( set::iterator iter = all_sounds.begin(); iter != all_sounds.end(); ++iter ) - if( (*iter)->GetOriginal() != (*iter) ) // child - { - set::iterator parent = ToDelete.find( (*iter)->GetOriginal() ); - if( parent != ToDelete.end() ) - ToDelete.erase( parent ); - } - for( it = ToDelete.begin(); it != ToDelete.end(); ++it ) owned_sounds.erase( *it ); g_SoundManMutex.Unlock(); /* finished with owned_sounds and all_sounds */