31 lua_rawgeti(L,
table, i + 1);
32 if (lua_isnil(L, -1)) {
52 static_assert(std::is_same_v<std::invoke_result_t<F>,
void>);
53 for (
int i = 0;
geti(L,
table, i); ++i, lua_pop(L, 1))
80 static inline T
readParam(lua_State *L,
int index,
const T &default_value)
82 return lua_isnoneornil(L, index) ? default_value :
readParam<T>(L, index);
static bool geti(lua_State *L, int table, int i)
Utility for list iteration.
Definition helper.h:29
static T readParam(lua_State *L, int index)
Read a value using a template type T from Lua state L at index.
static void for_ipairs(lua_State *L, int table, const F &f)
Iterate values t[1], t[2], ... of the given table in order.
Definition helper.h:48
static T readParam(lua_State *L, int index, const T &default_value)
Read a value using a template type T from Lua state L at index.
Definition helper.h:80
static std::vector< table_key > table
Definition keycode.cpp:33