PrepareExpression only used in one place and simple; merge down

This commit is contained in:
Glenn Maynard
2006-10-29 20:48:02 +00:00
parent 50a3420683
commit ff2b6f697c
3 changed files with 4 additions and 11 deletions
-7
View File
@@ -456,13 +456,6 @@ XNode *LuaHelpers::GetLuaInformation()
}
void LuaHelpers::PrepareExpression( RString &sInOut )
{
// Remove unary +, eg. "+50"; Lua doesn't support that.
if( sInOut.size() >= 1 && sInOut[0] == '+' )
sInOut.erase( 0, 1 );
}
bool LuaHelpers::RunScriptFile( const RString &sFile )
{
RString sScript;
-3
View File
@@ -61,9 +61,6 @@ namespace LuaHelpers
bool RunScriptFile( const RString &sFile );
/* Strip "//" comments and "+". */
void PrepareExpression( RString &sInOut );
/* Create a Lua array (a table with indices starting at 1) of the given vector,
* and push it on the stack. */
void CreateTableFromArrayB( Lua *L, const vector<bool> &aIn );
+4 -1
View File
@@ -957,7 +957,10 @@ void ThemeManager::PushMetric( Lua *L, const RString &sClassName, const RString
}
else
{
LuaHelpers::PrepareExpression( sValue );
// Remove unary +, eg. "+50"; Lua doesn't support that.
if( sValue.size() >= 1 && sValue[0] == '+' )
sValue.erase( 0, 1 );
LuaHelpers::RunExpression( L, sValue, sName );
}
}