PrepareExpression only used in one place and simple; merge down
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user