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

Method AddUnique

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

* Add a unique element to the array * * @param Item - the element * @return - the index of the added element */

Source from the content-addressed store, hash-verified

117 * @return - the index of the added element
118 */
119 FORCEINLINE int32 AddUnique(const void* Item)
120 {
121 int32 Index = Find(Item);
122 if (Index == INDEX_NONE)
123 {
124 Index = Add(Item);
125 }
126 return Index;
127 }
128
129 /**
130 * Add N defaulted elements to the array

Callers 5

TryReplaceInputsMethod · 0.80
TryBindMethod · 0.80
AddDelegateMethod · 0.80
TArray_AddUniqueFunction · 0.80
OnFileChangedMethod · 0.80

Calls 1

AddFunction · 0.85

Tested by

no test coverage detected