MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / clear

Function clear

Libs/sol/sol.hpp:10632–10644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10630 }
10631
10632 inline void clear(lua_State* L, int table_index) {
10633 lua_pushnil(L);
10634 while (lua_next(L, table_index) != 0) {
10635 // remove value
10636 lua_pop(L, 1);
10637 // duplicate key to protect form rawset
10638 lua_pushvalue(L, -1);
10639 // push new value
10640 lua_pushnil(L);
10641 // table_index%[key] = nil
10642 lua_rawset(L, table_index);
10643 }
10644 }
10645
10646 inline void clear(reference& r) {
10647 auto pp = push_pop<false>(r);

Callers 3

real_clear_traitsMethod · 0.70
clearMethod · 0.70
clearMethod · 0.70

Calls 3

index_ofMethod · 0.45
lua_stateMethod · 0.45
stack_indexMethod · 0.45

Tested by

no test coverage detected