Get code to compile in C++.

Change-Id: I2f56e6b71e33ffecdba9e4fa9ef8f891c88f850f
This commit is contained in:
Vincent Rabaud 2017-06-19 17:12:29 +02:00
parent 7b012987a2
commit 5d7a50efee
2 changed files with 8 additions and 2 deletions

View File

@ -28,11 +28,17 @@
#define GIF_DISPOSE_SHIFT 2 #define GIF_DISPOSE_SHIFT 2
// from utils/utils.h // from utils/utils.h
#ifdef __cplusplus
extern "C" {
#endif
extern void WebPCopyPlane(const uint8_t* src, int src_stride, extern void WebPCopyPlane(const uint8_t* src, int src_stride,
uint8_t* dst, int dst_stride, uint8_t* dst, int dst_stride,
int width, int height); int width, int height);
extern void WebPCopyPixels(const WebPPicture* const src, extern void WebPCopyPixels(const WebPPicture* const src,
WebPPicture* const dst); WebPPicture* const dst);
#ifdef __cplusplus
}
#endif
void GIFGetBackgroundColor(const ColorMapObject* const color_map, void GIFGetBackgroundColor(const ColorMapObject* const color_map,
int bgcolor_index, int transparent_index, int bgcolor_index, int transparent_index,

View File

@ -157,8 +157,8 @@ static PixOrCopyBlock* BackwardRefsNewBlock(VP8LBackwardRefs* const refs) {
extern void VP8LBackwardRefsCursorAdd(VP8LBackwardRefs* const refs, extern void VP8LBackwardRefsCursorAdd(VP8LBackwardRefs* const refs,
const PixOrCopy v); const PixOrCopy v);
WEBP_INLINE void VP8LBackwardRefsCursorAdd(VP8LBackwardRefs* const refs, void VP8LBackwardRefsCursorAdd(VP8LBackwardRefs* const refs,
const PixOrCopy v) { const PixOrCopy v) {
PixOrCopyBlock* b = refs->last_block_; PixOrCopyBlock* b = refs->last_block_;
if (b == NULL || b->size_ == refs->block_size_) { if (b == NULL || b->size_ == refs->block_size_) {
b = BackwardRefsNewBlock(refs); b = BackwardRefsNewBlock(refs);