mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Remove dead code (#10845)
This commit is contained in:
parent
67aa75d444
commit
4c76239818
31 changed files with 8 additions and 331 deletions
|
@ -157,35 +157,6 @@ void AsyncEngine::step(lua_State *L)
|
|||
lua_pop(L, 2); // Pop core and error handler
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void AsyncEngine::pushFinishedJobs(lua_State* L) {
|
||||
// Result Table
|
||||
MutexAutoLock l(resultQueueMutex);
|
||||
|
||||
unsigned int index = 1;
|
||||
lua_createtable(L, resultQueue.size(), 0);
|
||||
int top = lua_gettop(L);
|
||||
|
||||
while (!resultQueue.empty()) {
|
||||
LuaJobInfo jobDone = resultQueue.front();
|
||||
resultQueue.pop_front();
|
||||
|
||||
lua_createtable(L, 0, 2); // Pre-allocate space for two map fields
|
||||
int top_lvl2 = lua_gettop(L);
|
||||
|
||||
lua_pushstring(L, "jobid");
|
||||
lua_pushnumber(L, jobDone.id);
|
||||
lua_settable(L, top_lvl2);
|
||||
|
||||
lua_pushstring(L, "retval");
|
||||
lua_pushlstring(L, jobDone.serializedResult.data(),
|
||||
jobDone.serializedResult.size());
|
||||
lua_settable(L, top_lvl2);
|
||||
|
||||
lua_rawseti(L, top, index++);
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
void AsyncEngine::prepareEnvironment(lua_State* L, int top)
|
||||
{
|
||||
|
|
|
@ -98,12 +98,6 @@ public:
|
|||
*/
|
||||
void step(lua_State *L);
|
||||
|
||||
/**
|
||||
* Push a list of finished jobs onto the stack
|
||||
* @param L The Lua stack
|
||||
*/
|
||||
void pushFinishedJobs(lua_State *L);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Get a Job from queue to be processed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue