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:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user