From c3ed8bace58d433411a56cf8f10fb1bb4e8327b3 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Mon, 15 May 2023 10:01:55 +0200 Subject: [PATCH] Shorten loop into one call --- lua_translate | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lua_translate b/lua_translate index 7e08726..e6d3d14 100755 --- a/lua_translate +++ b/lua_translate @@ -44,12 +44,7 @@ for func in functions: ofile.write("\t" +arg+ ' ' +functions[func]["argNames"][invarCount - 1]+ ' = ' +checkfunc+ '(L,' +str(invarCount)+ ');\n') invarCount += 1 - invarCount = 0 - argstring = "" - for arg in functions[func]["arguments"]: - argstring += "," +functions[func]["argNames"][invarCount] - invarCount += 1 - argstring = "(" +argstring.strip(",")+ ")" + argstring = "(" +",".join(functions[func]["argNames"])+ ")" outtype = functions[func]["type"] if outtype == "void":