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

Function TSet_Contains

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

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

Source from the content-addressed store, hash-verified

101 * @see FLuaSet::Contains(...)
102 */
103static int32 TSet_Contains(lua_State* L)
104{
105 int32 NumParams = lua_gettop(L);
106 if (NumParams != 2)
107 return luaL_error(L, "invalid parameters");
108
109 FLuaSet* Set = (FLuaSet*)(GetCppInstanceFast(L, 1));
110 TSet_Guard(L, Set);
111
112 Set->ElementInterface->Initialize(Set->ElementCache);
113 Set->ElementInterface->Write(L, Set->ElementCache, 2);
114 bool bSuccess = Set->Contains(Set->ElementCache);
115 Set->ElementInterface->Destruct(Set->ElementCache);
116 lua_pushboolean(L, bSuccess);
117 return 1;
118}
119
120/**
121 * @see FLuaSet::Clear(...)

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
ContainsMethod · 0.80
InitializeMethod · 0.45
WriteMethod · 0.45
DestructMethod · 0.45

Tested by

no test coverage detected