diff --git a/stepmania/src/RageDisplay.h b/stepmania/src/RageDisplay.h index 218f5bc443..7edfa3cdfb 100644 --- a/stepmania/src/RageDisplay.h +++ b/stepmania/src/RageDisplay.h @@ -99,7 +99,7 @@ private: unsigned GetBPP(D3DFORMAT fmt) const; HRESULT SetMode(); D3DFORMAT FindBackBufferType(bool bWindowed, int iBPP); - D3DXMATRIX& GetTopMatrix() { return m_MatrixStack.ElementAt( m_MatrixStack.GetSize()-1 ); }; + D3DXMATRIX& GetTopMatrix() { return m_MatrixStack.back(); } HWND m_hWnd; diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index 8154996f40..718c2887f5 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -37,7 +37,7 @@ float TimeToSeconds( CString sHMS ) split( sHMS, ":", arrayBits, false ); while( arrayBits.GetSize() < 3 ) - arrayBits.InsertAt( 0, "0" ); // pad missing bits + arrayBits.insert(arrayBits.begin(), "0" ); // pad missing bits float fSeconds = 0; fSeconds += atoi( arrayBits[0] ) * 60 * 60; @@ -98,15 +98,14 @@ CString join( const CString &Deliminator, const CStringArray& Source) if( Source.GetSize() == 0 ) return ""; - CString csReturn; CString csTmp; // Loop through the Array and Append the Deliminator for( int iNum = 0; iNum < Source.GetSize()-1; iNum++ ) { - csTmp += Source.GetAt(iNum); + csTmp += Source[iNum]; csTmp += Deliminator; } - csTmp += Source.GetAt( Source.GetSize()-1 ); + csTmp += Source.back(); return csTmp; } diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 6d27bbb1c0..c68f854977 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -241,8 +241,8 @@ void ScreenManager::SetNewScreen( Screen *pNewScreen ) { RefreshCreditsMessages(); - // move current screen to ScreenToDelete - m_ScreensToDelete.Copy( m_ScreenStack ); + // move current screen(s) to ScreenToDelete + m_ScreensToDelete.insert(m_ScreensToDelete.end(), m_ScreenStack.begin(), m_ScreenStack.end()); m_ScreenStack.RemoveAll(); m_ScreenStack.Add( pNewScreen ); diff --git a/stepmania/src/ScreenMusicScroll.cpp b/stepmania/src/ScreenMusicScroll.cpp index 413155c1ef..08ef3ddf10 100644 --- a/stepmania/src/ScreenMusicScroll.cpp +++ b/stepmania/src/ScreenMusicScroll.cpp @@ -144,8 +144,7 @@ ScreenMusicScroll::ScreenMusicScroll() this->AddChild( &m_Background ); - CArray arraySongs; - arraySongs.Copy( SONGMAN->m_pSongs ); + CArray arraySongs = SONGMAN->m_pSongs; SortSongPointerArrayByTitle( arraySongs ); m_iNumLines = 0; diff --git a/stepmania/src/ScreenSelectGroup.cpp b/stepmania/src/ScreenSelectGroup.cpp index 1201e30392..74466ca0ef 100644 --- a/stepmania/src/ScreenSelectGroup.cpp +++ b/stepmania/src/ScreenSelectGroup.cpp @@ -66,8 +66,7 @@ ScreenSelectGroup::ScreenSelectGroup() // This will simply the code a bit, and fix a weird case that // causes a crash when there are duplicate song names. - CArray aAllSongs; - aAllSongs.Copy( SONGMAN->m_pSongs ); + CArray aAllSongs = SONGMAN->m_pSongs; // Filter out Songs that can't be played by the current Style for( i=aAllSongs.GetSize()-1; i>=0; i-- ) // foreach Song, back to front @@ -91,7 +90,7 @@ ScreenSelectGroup::ScreenSelectGroup() asGroupNames.RemoveAt( i ); } - asGroupNames.InsertAt(0, "ALL MUSIC" ); + asGroupNames.insert(asGroupNames.begin(), "ALL MUSIC" ); // Add songs to the MusicList. for( int j=0; j < asGroupNames.GetSize(); j++ ) /* for each group */ diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index ed1ad563b4..eaad855878 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -379,7 +379,7 @@ CString SongManager::GetGroupBannerPath( CString sGroupName ) void SongManager::GetGroupNames( CStringArray &AddTo ) { - AddTo.Copy( m_arrayGroupNames ); + AddTo.insert(AddTo.end(), m_arrayGroupNames.begin(), m_arrayGroupNames.end() ); } D3DXCOLOR SongManager::GetGroupColor( const CString &sGroupName ) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 2468a4f8e7..27b0210326 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -860,7 +860,7 @@ void Update() static InputEventArray ieArray; - ieArray.SetSize( 0, 20 ); // zero the array + ieArray.clear(); // empty the array INPUTFILTER->GetInputEvents( ieArray, fDeltaTime ); for( int i=0; i 0 ) m_textTip.SetText( m_arrayTips[0] ); }