From 6467fa0bc43c9d5d242b278d78a1db63948669e8 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 15 Jan 2006 08:09:03 +0000 Subject: [PATCH] simplify, eliminate GetAndClearScreen --- stepmania/src/ScreenSelect.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/stepmania/src/ScreenSelect.cpp b/stepmania/src/ScreenSelect.cpp index 6cb2a95c8a..8e9ad7635a 100644 --- a/stepmania/src/ScreenSelect.cpp +++ b/stepmania/src/ScreenSelect.cpp @@ -55,6 +55,7 @@ void ScreenSelect::Init() CString sChoiceName = asChoiceNames[c]; GameCommand mc; + mc.ApplyCommitsScreens( false ); mc.m_sName = sChoiceName; mc.Load( c, CHOICE(sChoiceName) ); m_aGameCommands.push_back( mc ); @@ -202,12 +203,10 @@ void ScreenSelect::HandleScreenMessage( const ScreenMessage SM ) } } - /* When applying, do make a copy of the GameCommand. That way, - * GetAndClearScreen doesn't mangle m_sScreen on our real copy. */ if( bAllPlayersChoseTheSame ) { - GameCommand gc = m_aGameCommands[iMastersIndex]; - CString sThisScreen = gc.GetAndClearScreen(); + const GameCommand &gc = m_aGameCommands[iMastersIndex]; + CString sThisScreen = gc.m_sScreen; if( m_sNextScreen == "" ) m_sNextScreen = sThisScreen; gc.ApplyToAllPlayers(); @@ -217,8 +216,8 @@ void ScreenSelect::HandleScreenMessage( const ScreenMessage SM ) FOREACH_HumanPlayer( p ) { int iIndex = this->GetSelectionIndex(p); - GameCommand gc = m_aGameCommands[iIndex]; - CString sThisScreen = gc.GetAndClearScreen(); + const GameCommand &gc = m_aGameCommands[iIndex]; + CString sThisScreen = gc.m_sScreen; if( m_sNextScreen == "" ) m_sNextScreen = sThisScreen; gc.Apply( p );