From 17202a5284b6dc39d281eb45e13ddc6f431d11fc Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 18 Jan 2006 04:59:00 +0000 Subject: [PATCH] simplify: no need to special case Exit --- stepmania/src/OptionRow.cpp | 58 +++++++++++++++---------------------- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/stepmania/src/OptionRow.cpp b/stepmania/src/OptionRow.cpp index c382741f1b..d92973a6ca 100644 --- a/stepmania/src/OptionRow.cpp +++ b/stepmania/src/OptionRow.cpp @@ -886,46 +886,34 @@ void OptionRow::SetExitText( CString sExitText ) void OptionRow::Reload() { - switch( GetRowType() ) - { - case OptionRow::RowType_Normal: - { - // TODO: Nothing uses this yet and it causes skips when changing options. - //if( m_pHand->m_Def.m_bExportOnChange ) - //{ - // bool bRowHasFocus[NUM_PLAYERS]; - // ZERO( bRowHasFocus ); - // ExportOptions( vpns, bRowHasFocus ); - //} + // TODO: Nothing uses this yet and it causes skips when changing options. + //if( m_pHand->m_Def.m_bExportOnChange ) + //{ + // bool bRowHasFocus[NUM_PLAYERS]; + // ZERO( bRowHasFocus ); + // ExportOptions( vpns, bRowHasFocus ); + //} - if( !m_pHand->Reload() ) - break; + if( !m_pHand->Reload() ) + return; - ChoicesChanged(); + ChoicesChanged(); - vector vpns; - FOREACH_HumanPlayer( p ) - vpns.push_back( p ); - ImportOptions( vpns ); - AfterImportOptions(); + vector vpns; + FOREACH_HumanPlayer( p ) + vpns.push_back( p ); + ImportOptions( vpns ); + AfterImportOptions(); - // TODO: Nothing uses this yet and it causes skips when changing options. - //if( m_pHand->m_Def.m_bExportOnChange ) - //{ - // bool bRowHasFocus[NUM_PLAYERS]; - // ZERO( bRowHasFocus ); - // ExportOptions( vpns, bRowHasFocus ); - //} + // TODO: Nothing uses this yet and it causes skips when changing options. + //if( m_pHand->m_Def.m_bExportOnChange ) + //{ + // bool bRowHasFocus[NUM_PLAYERS]; + // ZERO( bRowHasFocus ); + // ExportOptions( vpns, bRowHasFocus ); + //} - UpdateEnabledDisabled(); - } - break; - case OptionRow::RowType_Exit: - // nothing to do - break; - default: - ASSERT(0); - } + UpdateEnabledDisabled(); } void OptionRow::HandleMessage( const CString& sMessage )