diff options
author | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2020-08-21 15:53:30 +0200 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2020-08-23 09:57:45 +0200 |
commit | e7bb6db09a183807a8f94a8bdcf156a765402d9f (patch) | |
tree | cd4fdc2df803849944f2c2e544a82bb61c27d386 /insert_string_tpl.h | |
parent | 18ecfceb65862929206f50a20c649c81d3858bfd (diff) |
Replace hash_bits, hash_size and hash_mask with defines.
Diffstat (limited to 'insert_string_tpl.h')
-rw-r--r-- | insert_string_tpl.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/insert_string_tpl.h b/insert_string_tpl.h index d667231..17a42b2 100644 --- a/insert_string_tpl.h +++ b/insert_string_tpl.h @@ -42,7 +42,7 @@ ZLIB_INTERNAL Pos QUICK_INSERT_STRING(deflate_state *const s, const uint32_t str #endif UPDATE_HASH(s, h, val); - hm = h & s->hash_mask; + hm = h & HASH_MASK; head = s->head[hm]; if (LIKELY(head != str)) { @@ -63,7 +63,6 @@ ZLIB_INTERNAL Pos QUICK_INSERT_STRING(deflate_state *const s, const uint32_t str ZLIB_INTERNAL void INSERT_STRING(deflate_state *const s, const uint32_t str, uint32_t count) { uint8_t *strstart = s->window + str; uint8_t *strend = strstart + count - 1; /* last position */ - uint32_t hash_mask = s->hash_mask; for (Pos idx = str; strstart <= strend; idx++, strstart++) { uint32_t val, hm, h = 0; @@ -78,7 +77,7 @@ ZLIB_INTERNAL void INSERT_STRING(deflate_state *const s, const uint32_t str, uin #endif UPDATE_HASH(s, h, val); - hm = h & hash_mask; + hm = h & HASH_MASK; Pos head = s->head[hm]; if (LIKELY(head != idx)) { |