s/RemoveAll/clear/g

This commit is contained in:
Glenn Maynard
2002-10-24 20:15:24 +00:00
parent 85e409b121
commit 5c841f287b
17 changed files with 25 additions and 26 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ void BGAnimation::Unload()
{
for( int i=0; i<m_Layers.GetSize(); i++ )
delete m_Layers[i];
m_Layers.RemoveAll();
m_Layers.clear();
}
void BGAnimation::LoadFromStaticGraphic( CString sPath )
+2 -2
View File
@@ -77,9 +77,9 @@ void Background::Unload()
{
for( int i=0; i<m_BGAnimations.GetSize(); i++ )
delete m_BGAnimations[i];
m_BGAnimations.RemoveAll();
m_BGAnimations.clear();
m_aBGSegments.RemoveAll();
m_aBGSegments.clear();
m_iCurBGSegment = 0;
}
+2 -2
View File
@@ -75,7 +75,7 @@ void GameState::Reset()
m_bFreeze = 0;
m_apSongsPlayed.RemoveAll();
m_apSongsPlayed.clear();
m_iSongsIntoCourse = 0;
for( p=0; p<NUM_PLAYERS; p++ )
@@ -169,7 +169,7 @@ void GameState::ResetStageStatistics()
{
case PLAY_MODE_ONI:
case PLAY_MODE_ENDLESS:
m_apSongsPlayed.RemoveAll();
m_apSongsPlayed.clear();
break;
}
+3 -3
View File
@@ -24,7 +24,7 @@ InputQueue* INPUTQUEUE = NULL; // global and accessable from anywhere in our pro
InputQueue::InputQueue()
{
for( int p=0; p<NUM_PLAYERS; p++ )
m_aQueue[p].SetSize( MAX_INPUT_QUEUE_LENGTH );
m_aQueue[p].insert(m_aQueue[p].begin(), MAX_INPUT_QUEUE_LENGTH, GameButtonAndTime() );
}
void InputQueue::RememberInput( const GameInput GameI )
@@ -56,7 +56,7 @@ bool InputQueue::MatchesPattern( const GameController c, const MenuButton* butto
}
if( sequence_index == 0 ) // we matched the whole pattern
{
m_aQueue[c].RemoveAll(); // empty the queue so we don't match on it again
m_aQueue[c].clear(); // empty the queue so we don't match on it again
return true;
}
sequence_index--;
@@ -82,7 +82,7 @@ bool InputQueue::MatchesPattern( const GameController c, const GameButton* butto
}
if( sequence_index == 0 ) // we matched the whole pattern
{
m_aQueue[c].RemoveAll(); // empty the queue so we don't match on it again
m_aQueue[c].clear(); // empty the queue so we don't match on it again
return true;
}
sequence_index--;
+1 -1
View File
@@ -56,7 +56,7 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn )
m_sprHoldParts.TurnShadowOff();
m_colorTapTweens.RemoveAll();
m_colorTapTweens.clear();
const CString sColorsFilePath = GAMEMAN->GetPathTo( iColNum, "Tap.colors" );
FILE* fp = fopen( sColorsFilePath, "r" );
if( fp == NULL )
+1 -1
View File
@@ -209,7 +209,7 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
CStringArray asBits;
split( sDir, "\\", asBits, true);
CString sSongFolderName = asBits[ asBits.GetSize()-1 ];
asBits.RemoveAll();
asBits.clear();
split( sSongFolderName, " - ", asBits, false );
if( asBits.GetSize() == 2 )
+2 -2
View File
@@ -51,8 +51,8 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
{
LOG->Trace( "Song::LoadFromSMDir(%s)", sPath );
out.m_BPMSegments.RemoveAll();
out.m_StopSegments.RemoveAll();
out.m_BPMSegments.clear();
out.m_StopSegments.clear();
int i;
+1 -1
View File
@@ -109,7 +109,7 @@ PrefsManager::~PrefsManager()
ini.GetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds );
ini.GetValueB( "Options", "CoinOpMode", m_bCoinOpMode );
m_asAdditionalSongFolders.RemoveAll();
m_asAdditionalSongFolders.clear();
CString sAdditionalSongFolders;
ini.GetValue( "Options", "AdditionalSongFolders", sAdditionalSongFolders );
split( sAdditionalSongFolders, ",", m_asAdditionalSongFolders, true );
+1 -2
View File
@@ -61,8 +61,7 @@ void RageTexture::CreateFrameRects()
///////////////////////////////////
// Fill in the m_FrameRects with the bounds of each frame in the animation.
///////////////////////////////////
m_TextureCoordRects.SetSize( 1, 10 ); // most textures will have only one frame
m_TextureCoordRects.RemoveAll();
m_TextureCoordRects.clear();
for( int j=0; j<m_iFramesHigh; j++ ) // traverse along Y
{
+1 -1
View File
@@ -341,7 +341,7 @@ void DirCache::FlushCache()
{
for(int i = 0; i < directory_cache.GetSize(); ++i)
delete directory_cache[i];
directory_cache.RemoveAll();
directory_cache.clear();
}
void FlushDirCache() { DirectoryCache.FlushCache(); }
+1 -1
View File
@@ -630,7 +630,7 @@ void ScreenEz2SelectMusic::AfterMusicChange()
GAMESTATE->m_pCurSong = pSong;
m_arrayNotes.RemoveAll();
m_arrayNotes.clear();
switch( m_MusicWheel.GetSelectedType() )
{
+2 -2
View File
@@ -73,7 +73,7 @@ void ScreenManager::EmptyDeleteQueue()
for( int i=0; i<m_ScreensToDelete.GetSize(); i++ )
SAFE_DELETE( m_ScreensToDelete[i] );
m_ScreensToDelete.RemoveAll();
m_ScreensToDelete.clear();
}
void ScreenManager::Update( float fDeltaTime )
@@ -244,7 +244,7 @@ void ScreenManager::SetNewScreen( Screen *pNewScreen )
// move current screen(s) to ScreenToDelete
m_ScreensToDelete.insert(m_ScreensToDelete.end(), m_ScreenStack.begin(), m_ScreenStack.end());
m_ScreenStack.RemoveAll();
m_ScreenStack.clear();
m_ScreenStack.Add( pNewScreen );
}
+1 -1
View File
@@ -703,7 +703,7 @@ void ScreenSelectMusic::AfterMusicChange()
int pn;
for( pn = 0; pn < NUM_PLAYERS; ++pn)
m_arrayNotes[pn].RemoveAll();
m_arrayNotes[pn].clear();
switch( m_MusicWheel.GetSelectedType() )
{
+1 -1
View File
@@ -47,7 +47,7 @@ void ScrollingList::Unload()
{
for( int i=0; i<m_apSprites.GetSize(); i++ )
delete m_apSprites[i];
m_apSprites.RemoveAll();
m_apSprites.clear();
}
/************************************
+1 -1
View File
@@ -88,7 +88,7 @@ Song::~Song()
for( int i=0; i<m_apNotes.GetSize(); i++ )
SAFE_DELETE( m_apNotes[i] );
m_apNotes.RemoveAll();
m_apNotes.clear();
}
+2 -2
View File
@@ -234,9 +234,9 @@ void SongManager::FreeSongArray()
{
for( int i=0; i<m_pSongs.GetSize(); i++ )
SAFE_DELETE( m_pSongs[i] );
m_pSongs.RemoveAll();
m_pSongs.clear();
m_GroupBannerPaths.RemoveAll();
m_GroupBannerPaths.clear();
}
+2 -2
View File
@@ -242,7 +242,7 @@ void SongSelector::OnGroupChange()
m_textGroup.SetText( SONGMAN->ShortenGroupName(GetSelectedGroup()) );
// reload songs
m_pSongs.RemoveAll();
m_pSongs.clear();
SONGMAN->GetSongsInGroup( GetSelectedGroup(), m_pSongs );
OnSongChange();
@@ -264,7 +264,7 @@ void SongSelector::OnNotesTypeChange()
m_textStyle.SetText( GAMEMAN->GetStyleDefForStyle(GetSelectedStyle())->m_szName );
m_pNotess.RemoveAll();
m_pNotess.clear();
GetSelectedSong()->GetNotesThatMatch( GAMEMAN->GetStyleDefForStyle(GetSelectedStyle())->m_NotesType, m_pNotess );
SortNotesArrayByDifficulty( m_pNotess );
m_pNotess.Add( NULL ); // marker for "(NEW)"