Simplify: store attributes in a simple map<CString,CString>, not in an object.

Makes attributes lighter.
This commit is contained in:
Glenn Maynard
2005-10-11 10:24:07 +00:00
parent f533842452
commit 64d9c29568
8 changed files with 68 additions and 132 deletions
+2 -2
View File
@@ -50,8 +50,8 @@ void TitleTrans::LoadFromNode( const XNode* pNode )
{
/* Surround each regex with ^(...)$, to force all comparisons to default
* to being a full-line match. (Add ".*" manually if this isn't wanted.) */
const CString &sKeyName = attr->m_sName;
const CString &sValue = attr->m_sValue;
const CString &sKeyName = attr->first;
const CString &sValue = attr->second;
if( sKeyName == "DontTransliterate" ) translit = false;
else if( sKeyName == "TitleFrom" ) TitleFrom = "^(" + sValue + ")$";
else if( sKeyName == "ArtistFrom" ) ArtistFrom = "^(" + sValue + ")$";