diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-05 11:53:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-05 11:53:54 +0200 |
commit | 50cb781b1b8c3cd05e7b1934e7761348e7b2cba1 (patch) | |
tree | 0280b83613fed1d1ca369376eac7dc2c1142d887 | |
parent | e3db6199b64611731b26d451f396a0a1d253f8e0 (diff) | |
parent | c9edc82b3baffd24455d1db2800d946ca7e63588 (diff) |
Merge pull request #39316 from Anutrix/remove-hashmap-reduntant-func
Remove unused function get_key_value_ptr_array from hash_map.h and another tiny fix.
-rw-r--r-- | core/hash_map.h | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/core/hash_map.h b/core/hash_map.h index 78592f8d82..843430d082 100644 --- a/core/hash_map.h +++ b/core/hash_map.h @@ -524,28 +524,14 @@ public: 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)) { return; } for (int i = 0; i < (1 << hash_table_power); i++) { Element *e = hash_table[i]; while (e) { - *p_pairs = &e->pair; - 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); + r_keys->push_back(e->pair.key); e = e->next; } } |