mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 13:18:22 +01:00
Remove some unused enum values.
- WEBP_MUX_INVALID_PARAMETER: was used only at one place, and that too should actually be an assert(). - WEBP_MUX_ERROR: was never used. Change-Id: I8883cb4dfae7a7918507501f21fced0c04dda36a
This commit is contained in:
parent
857650c8fc
commit
a4b9b1c604
@ -117,13 +117,12 @@ static int CountOccurrences(const char* arglist[], int list_length,
|
||||
}
|
||||
|
||||
static const char* const kErrorMessages[] = {
|
||||
"WEBP_MUX_ERROR", "WEBP_MUX_NOT_FOUND", "WEBP_MUX_INVALID_ARGUMENT",
|
||||
"WEBP_MUX_INVALID_PARAMETER", "WEBP_MUX_BAD_DATA", "WEBP_MUX_MEMORY_ERROR",
|
||||
"WEBP_MUX_NOT_ENOUGH_DATA"
|
||||
"WEBP_MUX_NOT_FOUND", "WEBP_MUX_INVALID_ARGUMENT", "WEBP_MUX_BAD_DATA",
|
||||
"WEBP_MUX_MEMORY_ERROR", "WEBP_MUX_NOT_ENOUGH_DATA"
|
||||
};
|
||||
|
||||
static const char* ErrorString(WebPMuxError err) {
|
||||
assert(err <= WEBP_MUX_ERROR && err >= WEBP_MUX_NOT_ENOUGH_DATA);
|
||||
assert(err <= WEBP_MUX_NOT_FOUND && err >= WEBP_MUX_NOT_ENOUGH_DATA);
|
||||
return kErrorMessages[-err];
|
||||
}
|
||||
|
||||
|
@ -99,8 +99,7 @@ static WebPMuxError MuxAddChunk(WebPMux* const mux, uint32_t nth, uint32_t tag,
|
||||
const WebPData chunk_data = { data, size };
|
||||
assert(mux != NULL);
|
||||
assert(size <= MAX_CHUNK_PAYLOAD);
|
||||
|
||||
if (idx == IDX_NIL) return WEBP_MUX_INVALID_PARAMETER;
|
||||
assert(idx != IDX_NIL);
|
||||
return MuxSet(mux, idx, nth, &chunk_data, copy_data);
|
||||
}
|
||||
|
||||
|
@ -56,13 +56,11 @@ extern "C" {
|
||||
// Error codes
|
||||
typedef enum {
|
||||
WEBP_MUX_OK = 1,
|
||||
WEBP_MUX_ERROR = 0,
|
||||
WEBP_MUX_NOT_FOUND = -1,
|
||||
WEBP_MUX_INVALID_ARGUMENT = -2,
|
||||
WEBP_MUX_INVALID_PARAMETER = -3,
|
||||
WEBP_MUX_BAD_DATA = -4,
|
||||
WEBP_MUX_MEMORY_ERROR = -5,
|
||||
WEBP_MUX_NOT_ENOUGH_DATA = -6
|
||||
WEBP_MUX_NOT_FOUND = 0,
|
||||
WEBP_MUX_INVALID_ARGUMENT = -1,
|
||||
WEBP_MUX_BAD_DATA = -2,
|
||||
WEBP_MUX_MEMORY_ERROR = -3,
|
||||
WEBP_MUX_NOT_ENOUGH_DATA = -4
|
||||
} WebPMuxError;
|
||||
|
||||
// Flag values for different features used in VP8X chunk.
|
||||
|
Loading…
Reference in New Issue
Block a user