Fix code to compile with C++.

Change-Id: I324236440cb853cb3c8fb278ef22449cd9772ad7
This commit is contained in:
Vincent Rabaud 2017-05-15 15:51:48 +02:00
parent d78e5867ff
commit c8f14093ac
2 changed files with 3 additions and 2 deletions

View File

@ -361,7 +361,8 @@ int WebPWriteTIFF(FILE* fout, const WebPDecBuffer* const buffer) {
const uint8_t* rgba = buffer->u.RGBA.rgba; const uint8_t* rgba = buffer->u.RGBA.rgba;
const int stride = buffer->u.RGBA.stride; const int stride = buffer->u.RGBA.stride;
const uint8_t bytes_per_px = has_alpha ? 4 : 3; const uint8_t bytes_per_px = has_alpha ? 4 : 3;
const int assoc_alpha = WebPIsPremultipliedMode(buffer->colorspace) ? 1 : 2; const uint8_t assoc_alpha =
WebPIsPremultipliedMode(buffer->colorspace) ? 1 : 2;
// For non-alpha case, we omit tag 0x152 (ExtraSamples). // For non-alpha case, we omit tag 0x152 (ExtraSamples).
const uint8_t num_ifd_entries = has_alpha ? NUM_IFD_ENTRIES const uint8_t num_ifd_entries = has_alpha ? NUM_IFD_ENTRIES
: NUM_IFD_ENTRIES - 1; : NUM_IFD_ENTRIES - 1;

View File

@ -36,7 +36,7 @@ typedef struct {
int depth; int depth;
int max_value; int max_value;
int type; // 5, 6 or 7 int type; // 5, 6 or 7
PNMFlags seen_flags; int seen_flags;
} PNMInfo; } PNMInfo;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------