mirror of https://github.com/axmolengine/axmol.git
Merge pull request #4711 from samuele3hu/DispatcherBak1
Improve the coding style
This commit is contained in:
commit
d3ecc83419
|
@ -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