summaryrefslogtreecommitdiff
path: root/Utilities/cmliblzma/liblzma/lz/lz_encoder_hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmliblzma/liblzma/lz/lz_encoder_hash.h')
-rw-r--r--Utilities/cmliblzma/liblzma/lz/lz_encoder_hash.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/Utilities/cmliblzma/liblzma/lz/lz_encoder_hash.h b/Utilities/cmliblzma/liblzma/lz/lz_encoder_hash.h
index 342a333d16..de17c54fc3 100644
--- a/Utilities/cmliblzma/liblzma/lz/lz_encoder_hash.h
+++ b/Utilities/cmliblzma/liblzma/lz/lz_encoder_hash.h
@@ -39,25 +39,22 @@
// Endianness doesn't matter in hash_2_calc() (no effect on the output).
#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
# define hash_2_calc() \
- const uint32_t hash_value = *(const uint16_t *)(cur)
+ hash_value = *(const uint16_t *)(cur)
#else
# define hash_2_calc() \
- const uint32_t hash_value \
- = (uint32_t)(cur[0]) | ((uint32_t)(cur[1]) << 8)
+ hash_value = (uint32_t)(cur[0]) | ((uint32_t)(cur[1]) << 8)
#endif
#define hash_3_calc() \
- const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
- const uint32_t hash_2_value = temp & HASH_2_MASK; \
- const uint32_t hash_value \
- = (temp ^ ((uint32_t)(cur[2]) << 8)) & mf->hash_mask
+ temp = hash_table[cur[0]] ^ cur[1]; \
+ hash_2_value = temp & HASH_2_MASK; \
+ hash_value = (temp ^ ((uint32_t)(cur[2]) << 8)) & mf->hash_mask
#define hash_4_calc() \
- const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
- const uint32_t hash_2_value = temp & HASH_2_MASK; \
- const uint32_t hash_3_value \
- = (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK; \
- const uint32_t hash_value = (temp ^ ((uint32_t)(cur[2]) << 8) \
+ temp = hash_table[cur[0]] ^ cur[1]; \
+ hash_2_value = temp & HASH_2_MASK; \
+ hash_3_value = (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK; \
+ hash_value = (temp ^ ((uint32_t)(cur[2]) << 8) \
^ (hash_table[cur[3]] << 5)) & mf->hash_mask