Switch ConVar, CoreConfig off KTrie (bug 5884 part 8, r=ds).

This commit is contained in:
David Anderson
2013-08-25 12:13:30 -07:00
parent 3850765759
commit 77c7b312ea
4 changed files with 16 additions and 22 deletions
+3 -12
View File
@@ -33,7 +33,7 @@
#include "sm_srvcmds.h"
#include "sm_stringutil.h"
#include <sh_vector.h>
#include <sm_trie_tpl.h>
#include <sm_namehashset.h>
#include "logic_bridge.h"
ConVarManager g_ConVarManager;
@@ -54,7 +54,7 @@ SH_DECL_HOOK5_void(IServerPluginCallbacks, OnQueryCvarValueFinished, SH_NOATTRIB
const ParamType CONVARCHANGE_PARAMS[] = {Param_Cell, Param_String, Param_String};
typedef List<const ConVar *> ConVarList;
KTrie<ConVarInfo *> convar_cache;
NameHashSet<ConVarInfo *> convar_cache;
class ConVarReentrancyGuard
{
@@ -245,16 +245,7 @@ void ConVarManager::OnSourceModVSPReceived()
bool convar_cache_lookup(const char *name, ConVarInfo **pVar)
{
ConVarInfo **pLookup = convar_cache.retrieve(name);
if (pLookup != NULL)
{
*pVar = *pLookup;
return true;
}
else
{
return false;
}
return convar_cache.retrieve(name, pVar);
}
void ConVarManager::OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name, bool is_read_safe)