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

Method Reserve

Plugins/UnLua/Source/UnLua/Private/Containers/LuaArray.h:242–250  ·  view source on GitHub ↗

* Reserve space for N elements * * @param Size - the element * @return - whether the operation succeed */

Source from the content-addressed store, hash-verified

240 * @return - whether the operation succeed
241 */
242 FORCEINLINE bool Reserve(int32 Size)
243 {
244 if (Num() > 0)
245 {
246 return false;
247 }
248 ScriptArray->Empty(Size, ElementSize ALIGNMENT_PLACEHOLDER);
249 return true;
250 }
251
252 /**
253 * Resize the array to new size

Callers 3

FLuaRetValuesMethod · 0.45
TArray_ReserveFunction · 0.45
FFunctionDescMethod · 0.45

Calls 2

NumFunction · 0.85
EmptyMethod · 0.45

Tested by

no test coverage detected