* @see FLuaArray::Find(...) */
| 154 | * @see FLuaArray::Find(...) |
| 155 | */ |
| 156 | static int32 TArray_Find(lua_State* L) |
| 157 | { |
| 158 | int32 NumParams = lua_gettop(L); |
| 159 | if (NumParams != 2) |
| 160 | return luaL_error(L, "invalid parameters"); |
| 161 | |
| 162 | FLuaArray* Array = (FLuaArray*)(GetCppInstanceFast(L, 1)); |
| 163 | TArray_Guard(L, Array); |
| 164 | |
| 165 | Array->Inner->Initialize(Array->ElementCache); |
| 166 | Array->Inner->Write(L, Array->ElementCache, 2); |
| 167 | int32 Index = Array->Find(Array->ElementCache); |
| 168 | Array->Inner->Destruct(Array->ElementCache); |
| 169 | ++Index; |
| 170 | lua_pushinteger(L, Index); |
| 171 | return 1; |
| 172 | } |
| 173 | |
| 174 | /** |
| 175 | * @see FLuaArray::Insert(...) |
nothing calls this directly
no test coverage detected