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

Function TArray_Resize

Plugins/UnLua/Source/UnLua/Private/BaseLib/LuaLib_Array.cpp:274–286  ·  view source on GitHub ↗

* @see FLuaArray::Resize(...) */

Source from the content-addressed store, hash-verified

272 * @see FLuaArray::Resize(...)
273 */
274static int32 TArray_Resize(lua_State* L)
275{
276 int32 NumParams = lua_gettop(L);
277 if (NumParams != 2)
278 return luaL_error(L, "invalid parameters");
279
280 FLuaArray* Array = (FLuaArray*)(GetCppInstanceFast(L, 1));
281 TArray_Guard(L, Array);
282
283 int32 NewSize = lua_tointeger(L, 2);
284 Array->Resize(NewSize);
285 return 0;
286}
287
288/**
289 * @see FLuaArray::GetData(...)

Callers

nothing calls this directly

Calls 5

lua_gettopFunction · 0.85
luaL_errorFunction · 0.85
GetCppInstanceFastFunction · 0.85
TArray_GuardFunction · 0.85
ResizeMethod · 0.45

Tested by

no test coverage detected