Also Remove CParams from Table Filling Functions' Args
This commit is contained in:
@@ -427,9 +427,10 @@ static size_t ZSTD_BtFindBestMatch_extDict_selectMLS (
|
||||
/* Update chains up to ip (excluded)
|
||||
Assumption : always within prefix (i.e. not within extDict) */
|
||||
static U32 ZSTD_insertAndFindFirstIndex_internal(
|
||||
ZSTD_matchState_t* ms, ZSTD_compressionParameters const* cParams,
|
||||
ZSTD_matchState_t* ms,
|
||||
const BYTE* ip, U32 const mls)
|
||||
{
|
||||
const ZSTD_compressionParameters* const cParams = &ms->cParams;
|
||||
U32* const hashTable = ms->hashTable;
|
||||
const U32 hashLog = cParams->hashLog;
|
||||
U32* const chainTable = ms->chainTable;
|
||||
@@ -449,11 +450,8 @@ static U32 ZSTD_insertAndFindFirstIndex_internal(
|
||||
return hashTable[ZSTD_hashPtr(ip, hashLog, mls)];
|
||||
}
|
||||
|
||||
U32 ZSTD_insertAndFindFirstIndex(
|
||||
ZSTD_matchState_t* ms, ZSTD_compressionParameters const* cParams,
|
||||
const BYTE* ip)
|
||||
{
|
||||
return ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, cParams->searchLength);
|
||||
U32 ZSTD_insertAndFindFirstIndex(ZSTD_matchState_t* ms, const BYTE* ip) {
|
||||
return ZSTD_insertAndFindFirstIndex_internal(ms, ip, ms->cParams.searchLength);
|
||||
}
|
||||
|
||||
|
||||
@@ -480,7 +478,7 @@ size_t ZSTD_HcFindBestMatch_generic (
|
||||
size_t ml=4-1;
|
||||
|
||||
/* HC4 match finder */
|
||||
U32 matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls);
|
||||
U32 matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, ip, mls);
|
||||
|
||||
for ( ; (matchIndex>lowLimit) & (nbAttempts>0) ; nbAttempts--) {
|
||||
size_t currentMl=0;
|
||||
|
||||
Reference in New Issue
Block a user