* @see FLuaMap::Remove(...) */
| 149 | * @see FLuaMap::Remove(...) |
| 150 | */ |
| 151 | static int32 TMap_Remove(lua_State* L) |
| 152 | { |
| 153 | int32 NumParams = lua_gettop(L); |
| 154 | if (NumParams != 2) |
| 155 | return luaL_error(L, "invalid parameters"); |
| 156 | |
| 157 | FLuaMap* Map = (FLuaMap*)(GetCppInstanceFast(L, 1)); |
| 158 | TMap_Guard(L, Map); |
| 159 | |
| 160 | Map->KeyInterface->Initialize(Map->ElementCache); |
| 161 | Map->KeyInterface->Write(L, Map->ElementCache, 2); |
| 162 | bool bSuccess = Map->Remove(Map->ElementCache); |
| 163 | Map->KeyInterface->Destruct(Map->ElementCache); |
| 164 | lua_pushboolean(L, bSuccess); |
| 165 | return 1; |
| 166 | } |
| 167 | |
| 168 | /** |
| 169 | * @see FLuaMap::Find(...). Create a copy for the value |
nothing calls this directly
no test coverage detected