Remove not working argument

This commit is contained in:
Wend4r 2022-10-11 18:54:50 +03:00
parent 873fa9959c
commit 630277c4dc
2 changed files with 3 additions and 7 deletions

View File

@ -757,7 +757,6 @@ static cell_t smn_KeyValuesExport(IPluginContext *pCtx, const cell_t *params)
HandleError herr;
HandleSecurity sec;
KeyValueStack *pStk;
char *name;
sec.pOwner = NULL;
sec.pIdentity = g_pCoreIdent;
@ -767,11 +766,10 @@ static cell_t smn_KeyValuesExport(IPluginContext *pCtx, const cell_t *params)
{
return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
}
pCtx->LocalToString(params[2], &name);
KeyValues *pNewKV = new KeyValues(name[0] == '\0' ? NULL : name);
KeyValues *pNewKV = new KeyValues(NULL /* Will be initialized in KeyValues::operator=() */ );
*pNewKV = *(pStk->pCurRoot.front()); // KeyValues::operator= to recursive copy.
*pNewKV = *(pStk->pCurRoot.front()); // KeyValues::operator=() to recursive copy.
KeyValueStack *pExportStk = new KeyValueStack;

View File

@ -65,10 +65,8 @@ methodmap KeyValues < Handle
// Exports a KeyValues tree to new descriptor. The tree is dumped from the current position.
// The Handle must be closed.
//
// @param name Name of the root section where the export is placed.
// If NULL_STIRNG, export without a root section.
// @return A Handle to a new KeyValues structure.
public native KeyValues Export(const char[] name = NULL_STRING);
public native KeyValues Export();
// Exports a KeyValues tree to a file. The tree is dumped from the current position.
//