Switch HandleSys off KTrie (bug 5884 part 2, r=ds).

This commit is contained in:
David Anderson
2013-08-25 11:59:45 -07:00
parent 0144062126
commit 544b6d94aa
3 changed files with 9 additions and 17 deletions
+6 -13
View File
@@ -1,5 +1,5 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
@@ -240,21 +240,14 @@ HandleType_t HandleSystem::CreateType(const char *name,
return index;
}
bool HandleSystem::FindHandleType(const char *name, HandleType_t *type)
bool HandleSystem::FindHandleType(const char *name, HandleType_t *aResult)
{
QHandleType **typepp = m_TypeLookup.retrieve(name);
if (!typepp)
{
QHandleType *type;
if (!m_TypeLookup.retrieve(name, &type))
return false;
}
unsigned int offset = *typepp - m_Types;
if (type)
{
*type = offset;
}
if (aResult)
*aResult = type - m_Types;
return true;
}