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

Function TMap_Guard

Plugins/UnLua/Source/UnLua/Private/BaseLib/LuaLib_Map.cpp:20–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18#include "Containers/LuaMap.h"
19
20static FORCEINLINE void TMap_Guard(lua_State* L, FLuaMap* Map)
21{
22 if (!Map)
23 luaL_error(L, "invalid TMap");
24
25 if (!Map->KeyInterface->IsValid())
26 luaL_error(L, TCHAR_TO_UTF8(*FString::Printf(TEXT("invalid TMap key type:%s"), *Map->ValueInterface->GetName())));
27
28 if (!Map->ValueInterface->IsValid())
29 luaL_error(L, TCHAR_TO_UTF8(*FString::Printf(TEXT("invalid TMap value type:%s"), *Map->ValueInterface->GetName())));
30}
31
32static int32 TMap_New(lua_State* L)
33{

Callers 11

TMap_EnumerableFunction · 0.85
TMap_PairsFunction · 0.85
TMap_LengthFunction · 0.85
TMap_AddFunction · 0.85
TMap_RemoveFunction · 0.85
TMap_FindFunction · 0.85
TMap_FindRefFunction · 0.85
TMap_ClearFunction · 0.85
TMap_KeysFunction · 0.85
TMap_ValuesFunction · 0.85
TMap_ToTableFunction · 0.85

Calls 3

luaL_errorFunction · 0.85
IsValidMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected