First page Back Continue Last page Overview Graphics
Undertryk advarsel i en blok
void KeyTable::forget(Key *key) {
//lint --e{818} key could be const
if(key->prev) {
key->prev->next = key->next;
} else {
unsigned long hash_value = hashKey(key->key);
unsigned long hash_index = hash_value%table_size;
assert(table[hash_index]==key);
table[hash_index] = key->next;
}
if(key->next) key->next->prev = key->prev;
}
Notes:
-e(...), --e{...}, -e(...), -e... kan være ret forvirrende. Det anbefales at læse dokumentationen