Remove unused 's' parameter from HASH_CALC macro

This commit is contained in:
Hans Kristian Rosbach 2024-02-21 12:06:16 +01:00 committed by Hans Kristian Rosbach
parent a090529ece
commit ef2f8d528c
3 changed files with 7 additions and 7 deletions

View File

@ -10,7 +10,7 @@
#define HASH_SLIDE 16
#define HASH_CALC(s, h, val) h = ((val * 2654435761U) >> HASH_SLIDE);
#define HASH_CALC(h, val) h = ((val * 2654435761U) >> HASH_SLIDE);
#define HASH_CALC_VAR h
#define HASH_CALC_VAR_INIT uint32_t h = 0

View File

@ -10,7 +10,7 @@
#define HASH_SLIDE 5
#define HASH_CALC(s, h, val) h = ((h << HASH_SLIDE) ^ ((uint8_t)val))
#define HASH_CALC(h, val) h = ((h << HASH_SLIDE) ^ ((uint8_t)val))
#define HASH_CALC_VAR s->ins_h
#define HASH_CALC_VAR_INIT
#define HASH_CALC_READ val = strstart[0]

View File

@ -1,8 +1,8 @@
#ifndef INSERT_STRING_H_
#define INSERT_STRING_H_
/* insert_string.h -- Private insert_string functions shared with more than
* one insert string implementation
/* insert_string_tpl.h -- Private insert_string functions shared with more than
* one insert string implementation
*
* Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
*
@ -48,7 +48,7 @@
* previous key instead of complete recalculation each time.
*/
Z_INTERNAL uint32_t UPDATE_HASH(uint32_t h, uint32_t val) {
HASH_CALC(s, h, val);
HASH_CALC(h, val);
return h & HASH_CALC_MASK;
}
@ -64,7 +64,7 @@ Z_INTERNAL Pos QUICK_INSERT_STRING(deflate_state *const s, uint32_t str) {
HASH_CALC_VAR_INIT;
HASH_CALC_READ;
HASH_CALC(s, HASH_CALC_VAR, val);
HASH_CALC(HASH_CALC_VAR, val);
HASH_CALC_VAR &= HASH_CALC_MASK;
hm = HASH_CALC_VAR;
@ -93,7 +93,7 @@ Z_INTERNAL void INSERT_STRING(deflate_state *const s, uint32_t str, uint32_t cou
HASH_CALC_VAR_INIT;
HASH_CALC_READ;
HASH_CALC(s, HASH_CALC_VAR, val);
HASH_CALC(HASH_CALC_VAR, val);
HASH_CALC_VAR &= HASH_CALC_MASK;
hm = HASH_CALC_VAR;