Switch Enum to Only Non-Negative Values, Update Comments
This commit is contained in:
@@ -413,11 +413,8 @@ size_t ZSTD_CCtxParam_setParameter(
|
||||
return CCtxParams->forceWindow;
|
||||
|
||||
case ZSTD_p_forceAttachDict : {
|
||||
int signed_val = (int)value;
|
||||
CCtxParams->attachDictPref = signed_val ?
|
||||
(signed_val > 0 ? ZSTD_dictForceAttach :
|
||||
ZSTD_dictForceCopy) :
|
||||
ZSTD_dictDefaultAttach;
|
||||
CLAMPCHECK(value, ZSTD_dictDefaultAttach, ZSTD_dictForceCopy);
|
||||
CCtxParams->attachDictPref = value;
|
||||
return CCtxParams->attachDictPref;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,12 +48,6 @@ extern "C" {
|
||||
typedef enum { ZSTDcs_created=0, ZSTDcs_init, ZSTDcs_ongoing, ZSTDcs_ending } ZSTD_compressionStage_e;
|
||||
typedef enum { zcss_init=0, zcss_load, zcss_flush } ZSTD_cStreamStage;
|
||||
|
||||
typedef enum {
|
||||
ZSTD_dictDefaultAttach = 0,
|
||||
ZSTD_dictForceAttach = 1,
|
||||
ZSTD_dictForceCopy = -1,
|
||||
} ZSTD_dictAttachPref_e;
|
||||
|
||||
typedef struct ZSTD_prefixDict_s {
|
||||
const void* dict;
|
||||
size_t dictSize;
|
||||
|
||||
Reference in New Issue
Block a user