summaryrefslogtreecommitdiffstats
path: root/core/hash_map.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-08 14:16:21 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-08 14:17:04 -0300
commit0a59c3c3a6a8c13a5c82d59d9587fca31f900604 (patch)
treeab90b21abecdad449309edd2380389e02f90b6e3 /core/hash_map.h
parentd945c4e58ea1b49db3e0e96be46751b2d7fa808a (diff)
downloadredot-engine-0a59c3c3a6a8c13a5c82d59d9587fca31f900604.tar.gz
Dictionary keys are now sorted by insertion order
Diffstat (limited to 'core/hash_map.h')
-rw-r--r--core/hash_map.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/hash_map.h b/core/hash_map.h
index 523a4a6214..fba12b55ec 100644
--- a/core/hash_map.h
+++ b/core/hash_map.h
@@ -596,6 +596,20 @@ public:
hash_table_power=0;
}
+ void get_key_value_ptr_array(const Pair **p_pairs) const {
+ if (!hash_table)
+ return;
+ for(int i=0;i<(1<<hash_table_power);i++) {
+
+ Entry *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 (!hash_table)
return;