Lines Matching refs:hashCode
81 int hashCode = tab->nodeHash(node); in OH_HashMapAdd() local
82 hashCode = (hashCode < 0) ? -hashCode : hashCode; in OH_HashMapAdd()
83 hashCode = hashCode % tab->maxBucket; in OH_HashMapAdd()
84 …INIT_ERROR_CHECK(hashCode < tab->maxBucket, return -1, "Invalid hashcode %d %d", tab->maxBucket, h… in OH_HashMapAdd()
87 HashNode *tmp = GetHashNodeByNode(tab, tab->buckets[hashCode], node); in OH_HashMapAdd()
92 node->next = tab->buckets[hashCode]; in OH_HashMapAdd()
93 tab->buckets[hashCode] = node; in OH_HashMapAdd()
101 int hashCode = tab->keyHash(key); in OH_HashMapRemove() local
102 hashCode = (hashCode < 0) ? -hashCode : hashCode; in OH_HashMapRemove()
103 hashCode = hashCode % tab->maxBucket; in OH_HashMapRemove()
104 …INIT_ERROR_CHECK(hashCode < tab->maxBucket, return, "Invalid hashcode %d %d", tab->maxBucket, hash… in OH_HashMapRemove()
106 HashNode *node = tab->buckets[hashCode]; in OH_HashMapRemove()
111 if (node == tab->buckets[hashCode]) { in OH_HashMapRemove()
112 tab->buckets[hashCode] = node->next; in OH_HashMapRemove()
127 int hashCode = tab->keyHash(key); in OH_HashMapGet() local
128 hashCode = (hashCode < 0) ? -hashCode : hashCode; in OH_HashMapGet()
129 hashCode = hashCode % tab->maxBucket; in OH_HashMapGet()
130 INIT_ERROR_CHECK(hashCode < tab->maxBucket, return NULL, in OH_HashMapGet()
131 "Invalid hashcode %d %d", tab->maxBucket, hashCode); in OH_HashMapGet()
132 return GetHashNodeByKey(tab, tab->buckets[hashCode], key, tab->keyCompare); in OH_HashMapGet()
161 int hashCode, const void *key, HashKeyCompare keyCompare) in OH_HashMapFind() argument
166 INIT_ERROR_CHECK((hashCode < tab->maxBucket) && (hashCode >= 0), return NULL, in OH_HashMapFind()
167 "Invalid hash code %d %d", tab->maxBucket, hashCode); in OH_HashMapFind()
168 return GetHashNodeByKey(tab, tab->buckets[hashCode], key, keyCompare); in OH_HashMapFind()