MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / Clear

Method Clear

Code/CryEngine/CryScriptSystem/ScriptTable.cpp:694–711  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

692
693//////////////////////////////////////////////////////////////////////////
694void CScriptTable::Clear()
695{
696 CHECK_STACK(L);
697
698 PushRef();
699 int trgTable = lua_gettop(L);
700
701 lua_pushnil(L); // first key
702 while (lua_next(L, trgTable) != 0)
703 {
704 lua_pop(L, 1); // pop value, leave index.
705 lua_pushvalue(L, -1); // Push again index.
706 lua_pushnil(L);
707 lua_rawset(L, trgTable);
708 }
709 assert(lua_istable(L, -1));
710 lua_pop(L, 1);
711}
712
713//////////////////////////////////////////////////////////////////////////
714void CScriptTable::SetMetatable(IScriptTable* pMetatable)

Callers 2

ClearPreCachedBufferMethod · 0.45
MoveNextMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected