s/RemoteAt/erase/
This commit is contained in:
@@ -33,11 +33,11 @@ void AnnouncerManager::GetAnnouncerNames( CStringArray& AddTo )
|
||||
// strip out the folder called "CVS" and EMPTY_ANNOUNCER_NAME
|
||||
for( int i=AddTo.size()-1; i>=0; i-- )
|
||||
if( !stricmp( AddTo[i], "cvs" ) )
|
||||
AddTo.RemoveAt(i);
|
||||
AddTo.erase(AddTo.begin()+i, AddTo.begin()+i+1 );
|
||||
|
||||
for( int i=AddTo.size()-1; i>=0; i-- )
|
||||
if( !stricmp( AddTo[i], EMPTY_ANNOUNCER_NAME ) )
|
||||
AddTo.RemoveAt(i);
|
||||
AddTo.erase(AddTo.begin()+i, AddTo.begin()+i+1 );
|
||||
}
|
||||
|
||||
bool AnnouncerManager::DoesAnnouncerExist( CString sAnnouncerName )
|
||||
|
||||
@@ -264,14 +264,16 @@ void Background::LoadFromSong( Song* pSong )
|
||||
// strip out "cvs" and "danger
|
||||
for( int i=arrayPossibleAnims.size()-1; i>=0; i-- )
|
||||
if( 0==stricmp(arrayPossibleAnims[i].Right(3),"cvs") || 0==stricmp(arrayPossibleAnims[i].Right(3),"danger") )
|
||||
arrayPossibleAnims.RemoveAt(i);
|
||||
arrayPossibleAnims.erase(arrayPossibleAnims.begin()+i,
|
||||
arrayPossibleAnims.begin()+i+1);
|
||||
for( i=0; i<4 && !arrayPossibleAnims.empty(); i++ )
|
||||
{
|
||||
unsigned index = rand() % arrayPossibleAnims.size();
|
||||
BGAnimation *pTempBGA = new BGAnimation;
|
||||
pTempBGA->LoadFromAniDir( arrayPossibleAnims[index], sSongBackgroundPath );
|
||||
m_BGAnimations.Add( pTempBGA );
|
||||
arrayPossibleAnims.RemoveAt( index );
|
||||
arrayPossibleAnims.erase( arrayPossibleAnims.begin()+index,
|
||||
arrayPossibleAnims.begin()+index+1 );
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -287,7 +289,8 @@ void Background::LoadFromSong( Song* pSong )
|
||||
BGAnimation *pTempBGA = new BGAnimation;
|
||||
pTempBGA->LoadFromMovie( arrayPossibleMovies[index], true, false );
|
||||
m_BGAnimations.Add( pTempBGA );
|
||||
arrayPossibleMovies.RemoveAt( index );
|
||||
arrayPossibleMovies.erase( arrayPossibleMovies.begin()+index,
|
||||
arrayPossibleMovies.begin()+index+1 );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1346,7 +1346,7 @@ void GameManager::GetNoteSkinNames( Game game, CStringArray &AddTo ) const
|
||||
// strip out "CVS"
|
||||
for( int i=AddTo.size()-1; i>=0; i-- )
|
||||
if( 0 == stricmp("cvs", AddTo[i]) )
|
||||
AddTo.RemoveAt( i );
|
||||
AddTo.erase( AddTo.begin()+i, AddTo.begin()+i+1 );
|
||||
}
|
||||
|
||||
void GameManager::GetNoteSkinNames( CStringArray &AddTo ) const
|
||||
|
||||
@@ -30,8 +30,9 @@ InputQueue::InputQueue()
|
||||
void InputQueue::RememberInput( const GameInput GameI )
|
||||
{
|
||||
int c = GameI.controller;
|
||||
/* XXX: this should be a deque, and just pop_back */
|
||||
if( m_aQueue[c].size() >= MAX_INPUT_QUEUE_LENGTH ) // full
|
||||
m_aQueue[c].RemoveAt( 0, m_aQueue[c].size()-MAX_INPUT_QUEUE_LENGTH+1 );
|
||||
m_aQueue[c].erase( m_aQueue[c].begin(), m_aQueue[c].begin() + (m_aQueue[c].size()-MAX_INPUT_QUEUE_LENGTH+1) );
|
||||
m_aQueue[c].Add( GameButtonAndTime(GameI.button,TIMER->GetTimeSinceStart()) );
|
||||
};
|
||||
|
||||
|
||||
@@ -573,7 +573,8 @@ void NoteData::Turn( PlayerOptions::TurnType tt )
|
||||
{
|
||||
int iRandTrackIndex = rand()%aiTracksLeftToMap.size();
|
||||
int iRandTrack = aiTracksLeftToMap[iRandTrackIndex];
|
||||
aiTracksLeftToMap.RemoveAt( iRandTrackIndex );
|
||||
aiTracksLeftToMap.erase( aiTracksLeftToMap.begin()+iRandTrackIndex,
|
||||
aiTracksLeftToMap.begin()+iRandTrackIndex+1 );
|
||||
iTakeFromTrack[t] = iRandTrack;
|
||||
}
|
||||
}
|
||||
@@ -634,7 +635,8 @@ void NoteData::Turn( PlayerOptions::TurnType tt )
|
||||
{
|
||||
int iRandIndex = rand() % aiTracksThatCouldHaveTapNotes.size();
|
||||
int iTo = aiTracksThatCouldHaveTapNotes[ iRandIndex ];
|
||||
aiTracksThatCouldHaveTapNotes.RemoveAt( iRandIndex );
|
||||
aiTracksThatCouldHaveTapNotes.erase( aiTracksThatCouldHaveTapNotes.begin()+iRandIndex,
|
||||
aiTracksThatCouldHaveTapNotes.begin()+iRandIndex+1 );
|
||||
|
||||
tempNoteData.SetTapNote(iTo, r, GetTapNote(t, r));
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
|
||||
!stricmp(asBits[2], "hard") ||
|
||||
!stricmp(asBits[2], "crazy")) )
|
||||
{
|
||||
asBits.RemoveAt(2);
|
||||
asBits.erase(asBits.begin()+2, asBits.begin()+3);
|
||||
}
|
||||
|
||||
if( asBits.size() == 2 )
|
||||
|
||||
@@ -624,7 +624,7 @@ void RageDisplay::PushMatrix()
|
||||
|
||||
void RageDisplay::PopMatrix()
|
||||
{
|
||||
m_MatrixStack.RemoveAt( m_MatrixStack.size()-1 );
|
||||
m_MatrixStack.erase( m_MatrixStack.end()-1, m_MatrixStack.end() );
|
||||
}
|
||||
|
||||
void RageDisplay::Translate( float x, float y, float z )
|
||||
|
||||
@@ -48,7 +48,8 @@ void Screen::Update( float fDeltaTime )
|
||||
if( m_QueuedMessages[i].fDelayRemaining <= 0.0f ) // send this sucker!
|
||||
{
|
||||
this->HandleScreenMessage( m_QueuedMessages[i].SM );
|
||||
m_QueuedMessages.RemoveAt( i );
|
||||
m_QueuedMessages.erase( m_QueuedMessages.begin()+i,
|
||||
m_QueuedMessages.begin()+i+1 );
|
||||
i--;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -625,7 +625,8 @@ void AddBGChange( CString sBGName )
|
||||
}
|
||||
|
||||
if( i != pSong->m_BackgroundChanges.size() ) // there is already a BGChange here
|
||||
pSong->m_BackgroundChanges.RemoveAt( i );
|
||||
pSong->m_BackgroundChanges.erase( pSong->m_BackgroundChanges.begin()+i,
|
||||
pSong->m_BackgroundChanges.begin()+i+1);
|
||||
|
||||
// create a new BGChange
|
||||
if( sBGName != "" )
|
||||
@@ -1094,7 +1095,8 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
||||
else // BPMSegment being modified is m_BPMSegments[i]
|
||||
{
|
||||
if( i > 0 && fabsf(m_pSong->m_BPMSegments[i-1].m_fBPM - fNewBPM) < 0.025f )
|
||||
m_pSong->m_BPMSegments.RemoveAt( i );
|
||||
m_pSong->m_BPMSegments.erase( m_pSong->m_BPMSegments.begin()+i,
|
||||
m_pSong->m_BPMSegments.begin()+i+1);
|
||||
else
|
||||
m_pSong->m_BPMSegments[i].m_fBPM = fNewBPM;
|
||||
}
|
||||
@@ -1133,7 +1135,8 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
||||
{
|
||||
m_pSong->m_StopSegments[i].m_fStopSeconds += fStopDelta;
|
||||
if( m_pSong->m_StopSegments[i].m_fStopSeconds <= 0 )
|
||||
m_pSong->m_StopSegments.RemoveAt( i );
|
||||
m_pSong->m_StopSegments.erase( m_pSong->m_StopSegments.begin()+i,
|
||||
m_pSong->m_StopSegments.begin()+i+1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -218,7 +218,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
if( GAMESTATE->m_apSongsPlayed.size() > STAGES_TO_SHOW_IN_SUMMARY )
|
||||
GAMESTATE->m_apSongsPlayed.RemoveAt( 0, GAMESTATE->m_apSongsPlayed.size() - STAGES_TO_SHOW_IN_SUMMARY );
|
||||
GAMESTATE->m_apSongsPlayed.erase( GAMESTATE->m_apSongsPlayed.begin(), GAMESTATE->m_apSongsPlayed.begin() + (GAMESTATE->m_apSongsPlayed.size() - STAGES_TO_SHOW_IN_SUMMARY) );
|
||||
}
|
||||
|
||||
const unsigned iSongsToShow = GAMESTATE->m_apSongsPlayed.size();
|
||||
|
||||
@@ -289,7 +289,7 @@ void ScreenManager::PopTopScreen( ScreenMessage SM )
|
||||
{
|
||||
Screen* pScreenToPop = m_ScreenStack.back(); // top menu
|
||||
//pScreenToPop->HandleScreenMessage( SM_LosingInputFocus );
|
||||
m_ScreenStack.RemoveAt(m_ScreenStack.size()-1);
|
||||
m_ScreenStack.erase(m_ScreenStack.end()-1, m_ScreenStack.end());
|
||||
m_ScreensToDelete.Add( pScreenToPop );
|
||||
|
||||
Screen* pNewTopScreen = m_ScreenStack[m_ScreenStack.size()-1];
|
||||
|
||||
@@ -75,7 +75,7 @@ ScreenSelectGroup::ScreenSelectGroup()
|
||||
aAllSongs[j]->NormallyDisplayed() )
|
||||
continue;
|
||||
|
||||
aAllSongs.RemoveAt( j );
|
||||
aAllSongs.erase( aAllSongs.begin()+j, aAllSongs.begin()+j+1 );
|
||||
}
|
||||
|
||||
CStringArray asGroupNames;
|
||||
@@ -87,7 +87,8 @@ ScreenSelectGroup::ScreenSelectGroup()
|
||||
SortCStringArray(asGroupNames, true);
|
||||
for( i=asGroupNames.size()-1; i > 0; --i ) {
|
||||
if( asGroupNames[i] == asGroupNames[i-1] )
|
||||
asGroupNames.RemoveAt( i );
|
||||
asGroupNames.erase( asGroupNames.begin()+i,
|
||||
asGroupNames.begin()+i+1 );
|
||||
}
|
||||
|
||||
asGroupNames.insert(asGroupNames.begin(), "ALL MUSIC" );
|
||||
|
||||
@@ -232,7 +232,8 @@ void ScreenSelectMode::RefreshModeChoices()
|
||||
// remove ModeChoices that won't work with the current number of players
|
||||
for( i=m_aPossibleModeChoices.size()-1; i>=0; i-- )
|
||||
if( m_aPossibleModeChoices[i].numSidesJoinedToPlay != iNumSidesJoined )
|
||||
m_aPossibleModeChoices.RemoveAt( i );
|
||||
m_aPossibleModeChoices.erase( m_aPossibleModeChoices.begin()+i,
|
||||
m_aPossibleModeChoices.begin()+i+1 );
|
||||
|
||||
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
||||
|
||||
|
||||
@@ -52,9 +52,13 @@ void ThemeManager::GetAllThemeNames( CStringArray& AddTo )
|
||||
GetDirListing( THEMES_DIR+"\\*", AddTo, true );
|
||||
|
||||
// strip out the folder called "CVS"
|
||||
for( int i=AddTo.size()-1; i >= 0; i-- )
|
||||
if( 0 == stricmp(AddTo[i],"cvs") )
|
||||
AddTo.RemoveAt(i);
|
||||
for( CStringArray::iterator i=AddTo.begin(); i != AddTo.end(); ++i )
|
||||
{
|
||||
if( !stricmp(*i,"cvs") ) {
|
||||
AddTo.erase(i, i+1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ThemeManager::GetThemeNamesForCurGame( CStringArray& AddTo )
|
||||
|
||||
Reference in New Issue
Block a user