replace gotos with if blocks where appropriate

This commit is contained in:
Devin J. Pohly
2013-01-25 17:57:03 -05:00
parent 9237741149
commit 900d04e624
2 changed files with 33 additions and 36 deletions
+13 -15
View File
@@ -457,30 +457,28 @@ class OptionRowHandlerListSteps : public OptionRowHandlerList
if (STEPS_USE_CHART_NAME)
{
s = pSteps->GetChartName();
// TODO: find a way to make this use lua or metrics.
if (!(s == "" || s == "blank" || s == "Blank"))
{
goto nameGotten;
}
}
if( pSteps->GetDifficulty() == Difficulty_Edit )
// TODO: find a way to make this use lua or metrics.
if (s == "" || s == "blank" || s == "Blank")
{
s = pSteps->GetChartName();
if (s == "" || s == "blank" || s == "Blank")
s = pSteps->GetDescription();
}
else
{
if( pSteps->IsAnEdit() )
if( pSteps->GetDifficulty() == Difficulty_Edit )
{
s = pSteps->GetChartName();
if (s == "" || s == "blank" || s == "Blank")
s = pSteps->GetDescription();
}
else
s = CustomDifficultyToLocalizedString( GetCustomDifficulty( pSteps->m_StepsType, pSteps->GetDifficulty(), CourseType_Invalid ) );
{
if( pSteps->IsAnEdit() )
{
s = pSteps->GetChartName();
if (s == "" || s == "blank" || s == "Blank")
s = pSteps->GetDescription();
}
else
s = CustomDifficultyToLocalizedString( GetCustomDifficulty( pSteps->m_StepsType, pSteps->GetDifficulty(), CourseType_Invalid ) );
}
}
nameGotten:
s += ssprintf( " %d", pSteps->GetMeter() );
m_Def.m_vsChoices.push_back( s );
GameCommand mc;