style cleanup: use FOREACH_ENUM( X, x ) everywhere instead of FOREACH_X( x ) for consistency

The FOREACH_X defines are not very useful, and they were created back before FOREACH_ENUM was convenient.
This commit is contained in:
Chris Danford
2007-02-23 22:29:42 +00:00
parent 808a5d2b2c
commit 0160e23705
33 changed files with 92 additions and 108 deletions
+6 -6
View File
@@ -48,9 +48,9 @@ bool HighScoreImpl::operator==( const HighScoreImpl& other ) const
COMPARE( sPlayerGuid );
COMPARE( sMachineGuid );
COMPARE( iProductID );
FOREACH_TapNoteScore( tns )
FOREACH_ENUM( TapNoteScore, tns )
COMPARE( iTapNoteScores[tns] );
FOREACH_HoldNoteScore( hns )
FOREACH_ENUM( HoldNoteScore, hns )
COMPARE( iHoldNoteScores[hns] );
COMPARE( radarValues );
COMPARE( fLifeRemainingSeconds );
@@ -95,11 +95,11 @@ XNode *HighScoreImpl::CreateNode() const
pNode->AppendChild( "MachineGuid", sMachineGuid );
pNode->AppendChild( "ProductID", iProductID );
XNode* pTapNoteScores = pNode->AppendChild( "TapNoteScores" );
FOREACH_TapNoteScore( tns )
FOREACH_ENUM( TapNoteScore, tns )
if( tns != TNS_None ) // HACK: don't save meaningless "none" count
pTapNoteScores->AppendChild( TapNoteScoreToString(tns), iTapNoteScores[tns] );
XNode* pHoldNoteScores = pNode->AppendChild( "HoldNoteScores" );
FOREACH_HoldNoteScore( hns )
FOREACH_ENUM( HoldNoteScore, hns )
if( hns != HNS_None ) // HACK: don't save meaningless "none" count
pHoldNoteScores->AppendChild( HoldNoteScoreToString(hns), iHoldNoteScores[hns] );
pNode->AppendChild( radarValues.CreateNode(bWriteSimpleValues, bWriteComplexValues) );
@@ -127,11 +127,11 @@ void HighScoreImpl::LoadFromNode( const XNode *pNode )
pNode->GetChildValue( "ProductID", iProductID );
const XNode* pTapNoteScores = pNode->GetChild( "TapNoteScores" );
if( pTapNoteScores )
FOREACH_TapNoteScore( tns )
FOREACH_ENUM( TapNoteScore, tns )
pTapNoteScores->GetChildValue( TapNoteScoreToString(tns), iTapNoteScores[tns] );
const XNode* pHoldNoteScores = pNode->GetChild( "HoldNoteScores" );
if( pHoldNoteScores )
FOREACH_HoldNoteScore( hns )
FOREACH_ENUM( HoldNoteScore, hns )
pHoldNoteScores->GetChildValue( HoldNoteScoreToString(hns), iHoldNoteScores[hns] );
const XNode* pRadarValues = pNode->GetChild( "RadarValues" );
if( pRadarValues )