From 7e08ea84081404a52079323b868ea35151b0001c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 24 Oct 2002 20:16:46 +0000 Subject: [PATCH] get rid of some SetSize calls --- stepmania/src/MusicWheel.cpp | 6 +++--- stepmania/src/RageDisplay.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 17db094a5c..8108df249a 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -471,7 +471,7 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr case SORT_MOST_PLAYED: SortSongPointerArrayByMostPlayed( arraySongs ); if( arraySongs.GetSize() > 30 ) - arraySongs.SetSize( 30 ); + arraySongs.erase(arraySongs.begin()+30, arraySongs.end()); break; default: ASSERT(0); // unhandled SortOrder @@ -480,9 +480,9 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr /////////////////////////////////// - // Build an array of WheelItemDatas from the sorted list of Song*s + // Build an array of WheelItemDatas from the sorted list of Song*'s /////////////////////////////////// - arrayWheelItemDatas.SetSize( 0, 300 ); // clear out the previous wheel items and set large capacity jumps + arrayWheelItemDatas.clear(); // clear out the previous wheel items bool bUseSections = false; switch( so ) diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index 6d7c344820..46d6fb64eb 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -609,8 +609,10 @@ void RageDisplay::GetProjectionTransform( D3DXMATRIX* pMatrixOut ) void RageDisplay::ResetMatrixStack() { - m_MatrixStack.SetSize( 1, 20 ); - D3DXMatrixIdentity( &GetTopMatrix() ); + D3DXMATRIX ident; + D3DXMatrixIdentity( &ident ); + m_MatrixStack.clear(); + m_MatrixStack.push_back(ident); } void RageDisplay::PushMatrix()