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

Function ScriptStruct_Compare

Plugins/UnLua/Source/UnLua/Private/LuaCore.cpp:1761–1776  ·  view source on GitHub ↗

* Generic closure to compare two UScriptStructs */

Source from the content-addressed store, hash-verified

1759 * Generic closure to compare two UScriptStructs
1760 */
1761int32 ScriptStruct_Compare(lua_State *L)
1762{
1763 FClassDesc *ClassDesc = ScriptStruct_CheckParam(L);
1764 if (!ClassDesc)
1765 {
1766 return 0;
1767 }
1768
1769 UScriptStruct *ScriptStruct = ClassDesc->AsScriptStruct();
1770
1771 void *A = GetCppInstanceFast(L, 1);
1772 void *B = GetCppInstanceFast(L, 2);
1773 bool bResult = A && B ? ScriptStruct->CompareScriptStruct(A, B, /*PPF_None*/0) : false;
1774 lua_pushboolean(L, bResult);
1775 return 1;
1776}

Callers

nothing calls this directly

Calls 4

ScriptStruct_CheckParamFunction · 0.85
GetCppInstanceFastFunction · 0.85
lua_pushbooleanFunction · 0.85
AsScriptStructMethod · 0.80

Tested by

no test coverage detected