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

Function TSet_Add

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

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

Source from the content-addressed store, hash-verified

62 * @see FLuaSet::Add(...)
63 */
64static int32 TSet_Add(lua_State* L)
65{
66 int32 NumParams = lua_gettop(L);
67 if (NumParams != 2)
68 return luaL_error(L, "invalid parameters");
69
70 FLuaSet* Set = (FLuaSet*)(GetCppInstanceFast(L, 1));
71 TSet_Guard(L, Set);
72
73 Set->ElementInterface->Initialize(Set->ElementCache);
74 Set->ElementInterface->Write(L, Set->ElementCache, 2);
75 Set->Add(Set->ElementCache);
76 Set->ElementInterface->Destruct(Set->ElementCache);
77 return 0;
78}
79
80/**
81 * @see FLuaSet::Remove(...)

Callers

nothing calls this directly

Calls 8

lua_gettopFunction · 0.85
luaL_errorFunction · 0.85
GetCppInstanceFastFunction · 0.85
TSet_GuardFunction · 0.85
InitializeMethod · 0.45
WriteMethod · 0.45
AddMethod · 0.45
DestructMethod · 0.45

Tested by

no test coverage detected