* Convert the values to an array * * @param OutArray - the memory the result array resides * @return - the result array */
| 333 | * @return - the result array |
| 334 | */ |
| 335 | FORCEINLINE_DEBUGGABLE FLuaArray* Values(void *OutArray) const |
| 336 | { |
| 337 | if (ValueInterface && OutArray) |
| 338 | { |
| 339 | FScriptArray *ScriptArray = new FScriptArray; |
| 340 | //ArrayProperty->InitializeValue(ScriptArray); // do nothing... |
| 341 | FLuaArray *LuaArray = new(OutArray) FLuaArray(ScriptArray, ValueInterface, FLuaArray::OwnedBySelf); |
| 342 | int32 i = -1, Size = Map->Num(); |
| 343 | while (Size > 0) |
| 344 | { |
| 345 | if (IsValidIndex(++i)) |
| 346 | { |
| 347 | LuaArray->Add((uint8*)Map->GetData(i, MapLayout) + MapLayout.ValueOffset); |
| 348 | --Size; |
| 349 | } |
| 350 | } |
| 351 | return LuaArray; |
| 352 | } |
| 353 | return nullptr; |
| 354 | } |
| 355 | |
| 356 | FORCEINLINE bool IsValidIndex(int32 Index) const |
| 357 | { |
no test coverage detected