move SelectExactlyOne and GetOneSelection into a namespace

This commit is contained in:
Glenn Maynard
2006-01-18 02:00:22 +00:00
parent a3dc5596de
commit 1f3b71f3b1
3 changed files with 15 additions and 19 deletions
+3 -10
View File
@@ -77,19 +77,12 @@ public:
if( iter != m_vpDisplayedSongs.end() )
iChoice = iter - m_vpDisplayedSongs.begin();
FOREACH_PlayerNumber(pn)
vbSelectedOut[pn][iChoice] = true;
OptionRowHandlerUtil::SelectExactlyOne( iChoice, vbSelectedOut[pn] );
}
virtual int ExportOption( const OptionRowDefinition &def, const vector<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const
{
for( size_t iChoice = 0; iChoice < vbSelected[PLAYER_1].size(); ++iChoice )
{
if( vbSelected[PLAYER_1][iChoice] )
{
GAMESTATE->m_pCurSong.Set( m_vpDisplayedSongs[iChoice] );
return 0;
}
}
int iChoice = OptionRowHandlerUtil::GetOneSelection( vbSelected[PLAYER_1] );
GAMESTATE->m_pCurSong.Set( m_vpDisplayedSongs[iChoice] );
return 0;
}
};