MCPcopy Create free account
hub / github.com/DFHack/dfhack / GetVector

Function GetVector

library/include/LuaTools.h:427–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425 template<typename T>
426 requires std::is_arithmetic_v<T>
427 void GetVector(lua_State *state, std::vector<T> &pvec, int idx = 1) {
428 lua_pushnil(state); // first key
429 while (lua_next(state, idx) != 0)
430 {
431 pvec.push_back(lua_tointeger(state, -1));
432 lua_pop(state, 1); // remove value, leave key
433 }
434 }
435
436 DFHACK_EXPORT void GetVector(lua_State *state, std::vector<std::string> &pvec, int idx = 1);
437

Callers 9

get_commandsFunction · 0.85
loadModScriptPathsFunction · 0.85
textures_deleteHandleFunction · 0.85
textures_createTileFunction · 0.85
textures_createTilesetFunction · 0.85
internal_setArmokToolsFunction · 0.85
setMaterialMaskFilterFunction · 0.85
setMaterialFilterFunction · 0.85

Calls 2

lua_pushnilFunction · 0.85
lua_nextFunction · 0.85

Tested by

no test coverage detected