more of the same (store dir in an attribute, so it's easier to navigate)

perhaps all "key" data should be in attributes; it's a clean distinction,
and we rarely have more than one key (at most 3 for edits)
This commit is contained in:
Glenn Maynard
2004-02-22 04:06:36 +00:00
parent 181e9186d9
commit e4ff8dd725
+4 -3
View File
@@ -605,7 +605,7 @@ XNode* Profile::SaveSongScoresCreateNode() const
continue;
LPXNode pSongNode = pNode->AppendChild( "Song" );
pSongNode->AppendChild( "SongDir", pSong->GetSongDir() );
pSongNode->AppendAttr( "Dir", pSong->GetSongDir() );
const vector<Steps*> vSteps = pSong->GetAllSteps();
@@ -644,9 +644,10 @@ void Profile::LoadSongScoresFromNode( const XNode* pNode )
if( (*song)->name != "Song" )
continue;
CString sSongDir;
if( !(*song)->GetChildValue("SongDir", sSongDir) )
const LPXAttr TypeAttr = (*song)->GetAttr( "Dir" );
if( TypeAttr == NULL )
WARN_AND_CONTINUE;
const CString sSongDir = TypeAttr->value;
Song* pSong = SONGMAN->GetSongFromDir( sSongDir );
if( pSong == NULL )