fix compiling regex repeatedly

This commit is contained in:
Glenn Maynard
2005-09-04 19:32:58 +00:00
parent 3bd3fabc44
commit a23620b72f
+1 -1
View File
@@ -251,7 +251,7 @@ void PlayerOptions::FromString( CString sOptions, bool bWarnOnInvalid )
#define SET_FLOAT( opt ) { m_ ## opt = level; m_Speed ## opt = speed; }
const bool on = (level > 0.5f);
Regex mult("^([0-9]+(\\.[0-9]+)?)x$");
static Regex mult("^([0-9]+(\\.[0-9]+)?)x$");
vector<CString> matches;
if( mult.Compare(sBit, matches) )
{