projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dcf7c4
)
[map] Add TODO
author
Behdad Esfahbod
<behdad@behdad.org>
Sat, 30 Mar 2019 23:29:19 +0000
(16:29 -0700)
committer
Behdad Esfahbod
<behdad@behdad.org>
Sat, 30 Mar 2019 23:29:19 +0000
(16:29 -0700)
src/hb-map.hh
patch
|
blob
|
history
diff --git
a/src/hb-map.hh
b/src/hb-map.hh
index
d36515a
..
a2bbff5
100644
(file)
--- a/
src/hb-map.hh
+++ b/
src/hb-map.hh
@@
-46,6
+46,10
@@
struct hb_hashmap_t
static_assert (hb_is_integer (K) || hb_is_pointer (K), "");
static_assert (hb_is_integer (V) || hb_is_pointer (V), "");
+ /* TODO If key type is a pointer, keep hash in item_t and use to:
+ * 1. avoid rehashing when resizing table, and
+ * 2. compare hash before comparing keys, for speed.
+ */
struct item_t
{
K key;
@@
-248,6
+252,10
@@
struct hb_hashmap_t
}
};
+/*
+ * hb_map_t
+ */
+
struct hb_map_t : hb_hashmap_t<hb_codepoint_t,
hb_codepoint_t,
HB_MAP_VALUE_INVALID,