I'm not crazy about overloading "FromString" names: it's hard to tell

where they're used from a search.  It's useful for overloaded things
(templates and macros), but since we have "FloatToString", let's prefer
that.
This commit is contained in:
Glenn Maynard
2006-06-15 03:16:55 +00:00
parent f0b7631e3a
commit 25b8421da0
+2 -2
View File
@@ -107,12 +107,12 @@ void SongOptions::FromString( const RString &sOptions )
Regex mult("^([0-9]+(\\.[0-9]+)?)xmusic$");
vector<RString> matches;
if( mult.Compare(sBit, matches) )
::FromString( matches[0], m_fMusicRate );
m_fMusicRate = StringToFloat( matches[0] );
matches.clear();
Regex lives("^([0-9]+) ?(lives|life)$");
if( lives.Compare(sBit, matches) )
::FromString( matches[0], m_iBatteryLives );
m_iBatteryLives = atoi( matches[0] );
vector<RString> asParts;
split( sBit, " ", asParts, true );