hack to fix metrics that start with +

This commit is contained in:
Glenn Maynard
2004-09-28 10:03:49 +00:00
parent 232cf294ea
commit f22ec944d4
+5
View File
@@ -618,6 +618,11 @@ float ThemeManager::GetMetricF( CString sClassName, CString sValueName )
// HACK: Many metrics have "//" comments that Lua fails to parse.
// Replace them with Lua-style comments.
str.Replace( "//", "--" );
// Remove leading +, eg. "+50"; Lua doesn't handle that.
if( str.size() >= 1 && str[0] == '+' )
str.erase( 0, 1 );
return Lua::RunExpressionF( str );
}