void* CMapPtrToPtr::GetvalueAt(void* key) const
// find value (or return NULL -- NULL values not different as a result)
{
if (m_pHashTable == NULL)
return NULL; //程序到这里返回,调试时错误也就指示这里
UINT nHash = HashKey(key) % m_nHashTableSize;
// see if it exists
CAssoc* pAssoc;
for (pAssoc = m_pHashTable[nHash]; pAssoc != NULL; pAssoc = pAssoc->pNext)
{
if (pAssoc->key == key)
return pAssoc->value;
}
return NULL;
}