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

Method Insert

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

* Insert an element * * @param Item - the element * @param Index - the index */

Source from the content-addressed store, hash-verified

178 * @param Index - the index
179 */
180 FORCEINLINE void Insert(const void* Item, int32 Index)
181 {
182 if (Index >= 0 && Index <= Num())
183 {
184 ScriptArray->Insert(Index, 1, ElementSize ALIGNMENT_PLACEHOLDER);
185 Construct(Index, 1);
186 uint8* Dest = GetData(Index);
187 Inner->Copy(Dest, Item);
188 }
189 }
190
191 /**
192 * Remove the i'th element

Callers 1

TArray_InsertFunction · 0.80

Calls 2

NumFunction · 0.85
CopyMethod · 0.45

Tested by

no test coverage detected