remove comment hacks

This commit is contained in:
Glenn Maynard
2006-10-23 20:54:53 +00:00
parent e246824ce3
commit 6327074f99
-6
View File
@@ -458,12 +458,6 @@ XNode *LuaHelpers::GetLuaInformation()
void LuaHelpers::PrepareExpression( RString &sInOut )
{
// HACK: Many metrics have "// foo" and "# foo" comments that Lua fails to parse.
// Replace them with Lua-style comments.
// XXX: "Foo=Func('#AABBCC')" and "Text=Adjust('// subtitle') aren't comments.
sInOut.Replace( "//", "--" );
sInOut.Replace( "#", "--" );
// Remove unary +, eg. "+50"; Lua doesn't support that.
if( sInOut.size() >= 1 && sInOut[0] == '+' )
sInOut.erase( 0, 1 );