Update these loops.
This commit is contained in:
+5
-6
@@ -670,10 +670,10 @@ XNode *LuaHelpers::GetLuaInformation()
|
|||||||
|
|
||||||
/* Globals */
|
/* Globals */
|
||||||
sort( vFunctions.begin(), vFunctions.end() );
|
sort( vFunctions.begin(), vFunctions.end() );
|
||||||
FOREACH_CONST( RString, vFunctions, func )
|
for (RString const &func : vFunctions)
|
||||||
{
|
{
|
||||||
XNode *pFunctionNode = pGlobalsNode->AppendChild( "Function" );
|
XNode *pFunctionNode = pGlobalsNode->AppendChild( "Function" );
|
||||||
pFunctionNode->AppendAttr( "name", *func );
|
pFunctionNode->AppendAttr( "name", func );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Classes */
|
/* Classes */
|
||||||
@@ -708,10 +708,10 @@ XNode *LuaHelpers::GetLuaInformation()
|
|||||||
const vector<RString> &vNamespace = iter->second;
|
const vector<RString> &vNamespace = iter->second;
|
||||||
pNamespaceNode->AppendAttr( "name", iter->first );
|
pNamespaceNode->AppendAttr( "name", iter->first );
|
||||||
|
|
||||||
FOREACH_CONST( RString, vNamespace, func )
|
for (RString const &func: vNamespace)
|
||||||
{
|
{
|
||||||
XNode *pFunctionNode = pNamespaceNode->AppendChild( "Function" );
|
XNode *pFunctionNode = pNamespaceNode->AppendChild( "Function" );
|
||||||
pFunctionNode->AppendAttr( "name", *func );
|
pFunctionNode->AppendAttr( "name", func );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -861,9 +861,8 @@ void LuaHelpers::ParseCommandList( Lua *L, const RString &sCommands, const RStri
|
|||||||
|
|
||||||
s << "return function(self)\n";
|
s << "return function(self)\n";
|
||||||
|
|
||||||
FOREACH_CONST( Command, cmds.v, c )
|
for (Command const &cmd : cmds.v)
|
||||||
{
|
{
|
||||||
const Command& cmd = (*c);
|
|
||||||
RString local_sName = cmd.GetName();
|
RString local_sName = cmd.GetName();
|
||||||
s << "\tself:" << local_sName << "(";
|
s << "\tself:" << local_sName << "(";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user