whoops. Move the Lua comment hack to the right place.

This commit is contained in:
Chris Danford
2004-09-24 04:55:28 +00:00
parent f8d3996b35
commit 81b7695c7e
2 changed files with 10 additions and 9 deletions
+8 -2
View File
@@ -614,18 +614,24 @@ int ThemeManager::GetMetricI( CString sClassName, CString sValueName )
float ThemeManager::GetMetricF( CString sClassName, CString sValueName )
{
const CString str = GetMetricRaw( sClassName,sValueName );
CString str = GetMetricRaw( sClassName,sValueName );
// HACK: Many metrics have "//" comments that Lua fails to parse.
// Replace them with Lua-style comments.
str.Replace( "//", "--" );
return Lua::RunExpressionF( str );
}
// #include "LuaHelpers.h"
bool ThemeManager::GetMetricB( CString sClassName, CString sValueName )
{
const CString str = GetMetricRaw( sClassName,sValueName );
CString str = GetMetricRaw( sClassName,sValueName );
if( str == "0" )
return false; /* optimization */
if( str == "1" )
return true; /* optimization */
// HACK: Many metrics have "//" comments that Lua fails to parse.
// Replace them with Lua-style comments.
str.Replace( "//", "--" );
return Lua::RunExpressionB( str );
}