Commit c9edc82b by unknown

Remove unused function get_key_value_ptr_array from hash_map.h and also fix…

Remove unused function get_key_value_ptr_array from hash_map.h and also fix parameter name in function get_key_list.
parent 243cb503
...@@ -524,28 +524,14 @@ public: ...@@ -524,28 +524,14 @@ public:
copy_from(p_table); copy_from(p_table);
} }
void get_key_value_ptr_array(const Pair **p_pairs) const { void get_key_list(List<TKey> *r_keys) const {
if (unlikely(!hash_table)) { if (unlikely(!hash_table)) {
return; return;
} }
for (int i = 0; i < (1 << hash_table_power); i++) { for (int i = 0; i < (1 << hash_table_power); i++) {
Element *e = hash_table[i]; Element *e = hash_table[i];
while (e) { while (e) {
*p_pairs = &e->pair; r_keys->push_back(e->pair.key);
p_pairs++;
e = e->next;
}
}
}
void get_key_list(List<TKey> *p_keys) const {
if (unlikely(!hash_table)) {
return;
}
for (int i = 0; i < (1 << hash_table_power); i++) {
Element *e = hash_table[i];
while (e) {
p_keys->push_back(e->pair.key);
e = e->next; e = e->next;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment