MCPcopy Create free account
hub / github.com/Tencent/UnLua / TSet_Remove

Function TSet_Remove

Plugins/UnLua/Source/UnLua/Private/BaseLib/LuaLib_Set.cpp:83–98  ·  view source on GitHub ↗

* @see FLuaSet::Remove(...) */

Source from the content-addressed store, hash-verified

81 * @see FLuaSet::Remove(...)
82 */
83static int32 TSet_Remove(lua_State* L)
84{
85 int32 NumParams = lua_gettop(L);
86 if (NumParams != 2)
87 return luaL_error(L, "invalid parameters");
88
89 FLuaSet* Set = (FLuaSet*)(GetCppInstanceFast(L, 1));
90 TSet_Guard(L, Set);
91
92 Set->ElementInterface->Initialize(Set->ElementCache);
93 Set->ElementInterface->Write(L, Set->ElementCache, 2);
94 bool bSuccess = Set->Remove(Set->ElementCache);
95 Set->ElementInterface->Destruct(Set->ElementCache);
96 lua_pushboolean(L, bSuccess);
97 return 1;
98}
99
100/**
101 * @see FLuaSet::Contains(...)

Callers

nothing calls this directly

Calls 9

lua_gettopFunction · 0.85
luaL_errorFunction · 0.85
GetCppInstanceFastFunction · 0.85
TSet_GuardFunction · 0.85
lua_pushbooleanFunction · 0.85
InitializeMethod · 0.45
WriteMethod · 0.45
RemoveMethod · 0.45
DestructMethod · 0.45

Tested by

no test coverage detected