simplify more

This commit is contained in:
Glenn Maynard
2004-11-02 07:55:55 +00:00
parent ab7a7076d7
commit a2c8f90224
+2 -10
View File
@@ -230,21 +230,13 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Steps &out, const map<CSt
}
StripCrnl(line);
CString value_name; // fill these in
CString value_data;
// BMS value names can be separated by a space or a colon.
size_t iIndexOfSeparator = line.find_first_of( ": " );
CString value_name = line.substr( 0, iIndexOfSeparator );
CString value_data;
if( iIndexOfSeparator != line.npos )
{
value_name = line.substr( 0, iIndexOfSeparator );
value_data = line.substr( iIndexOfSeparator+1 );
}
else // no separator
{
value_name = line;
}
LOG->Trace("'%s', '%s'", value_name.c_str(), value_data.c_str());
value_name.MakeLower();