* @see FLuaArray::Insert(...) */
| 175 | * @see FLuaArray::Insert(...) |
| 176 | */ |
| 177 | static int32 TArray_Insert(lua_State* L) |
| 178 | { |
| 179 | int32 NumParams = lua_gettop(L); |
| 180 | if (NumParams != 3) |
| 181 | return luaL_error(L, "invalid parameters"); |
| 182 | |
| 183 | FLuaArray* Array = (FLuaArray*)(GetCppInstanceFast(L, 1)); |
| 184 | TArray_Guard(L, Array); |
| 185 | |
| 186 | Array->Inner->Initialize(Array->ElementCache); |
| 187 | Array->Inner->Write(L, Array->ElementCache, 2); |
| 188 | int32 Index = lua_tointeger(L, 3); |
| 189 | --Index; |
| 190 | Array->Insert(Array->ElementCache, Index); |
| 191 | Array->Inner->Destruct(Array->ElementCache); |
| 192 | return 0; |
| 193 | } |
| 194 | |
| 195 | /** |
| 196 | * @see FLuaArray::Remove(...) |
nothing calls this directly
no test coverage detected