From e7bb6db09a183807a8f94a8bdcf156a765402d9f Mon Sep 17 00:00:00 2001 From: Hans Kristian Rosbach Date: Fri, 21 Aug 2020 15:53:30 +0200 Subject: Replace hash_bits, hash_size and hash_mask with defines. --- insert_string_tpl.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'insert_string_tpl.h') diff --git a/insert_string_tpl.h b/insert_string_tpl.h index d667231c98..17a42b2d39 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)) { -- cgit 0.0.5-2-1-g0f52