mirror of https://github.com/axmolengine/axmol.git
Improve the coding style
This commit is contained in:
parent
ee7aa0f077
commit
30439e4689
|
@ -627,23 +627,14 @@ int LuaStack::executeFunction(int handler, int numArgs, int numResults, const st
|
|||
}
|
||||
|
||||
// get return value,don't pass LUA_MULTRET to numResults,
|
||||
if (numResults <= 0)
|
||||
{
|
||||
if (traceCallback)
|
||||
lua_pop(_state, 1);
|
||||
do {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (nullptr == func)
|
||||
{
|
||||
if (traceCallback)
|
||||
lua_pop(_state, 1);
|
||||
if (numResults <= 0 || nullptr == func)
|
||||
break;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
func(_state,numResults);
|
||||
func(_state, numResults);
|
||||
|
||||
} while (0);
|
||||
|
||||
if (traceCallback)
|
||||
{
|
||||
|
@ -651,8 +642,6 @@ int LuaStack::executeFunction(int handler, int numArgs, int numResults, const st
|
|||
}
|
||||
}
|
||||
|
||||
lua_settop(_state, 0);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue