[buffer] Improve hash function of segment_properties_t

This commit is contained in:
Behdad Esfahbod 2022-05-20 13:15:52 -06:00
parent aee123fc83
commit 2e186d9f24
1 changed files with 2 additions and 2 deletions

View File

@ -81,8 +81,8 @@ hb_segment_properties_equal (const hb_segment_properties_t *a,
unsigned int unsigned int
hb_segment_properties_hash (const hb_segment_properties_t *p) hb_segment_properties_hash (const hb_segment_properties_t *p)
{ {
return (unsigned int) p->direction ^ return ((unsigned int) p->direction * 31 +
(unsigned int) p->script ^ (unsigned int) p->script) * 31 +
(intptr_t) (p->language); (intptr_t) (p->language);
} }