From 2438c3cdd14087bfc3375ed1f5521ad5c0c09bbc Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 25 Nov 2015 20:05:53 +0200 Subject: [PATCH] Use libjpeg's boolean type for better compatibility Libjpeg 9 changed to an enum boolean type. --- source/graphics/jpeg/jpegloader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/graphics/jpeg/jpegloader.cpp b/source/graphics/jpeg/jpegloader.cpp index 844446c..38df348 100644 --- a/source/graphics/jpeg/jpegloader.cpp +++ b/source/graphics/jpeg/jpegloader.cpp @@ -40,12 +40,12 @@ void init_source(j_decompress_ptr jpeg) src->bytes_in_buffer = 0; } -int fill_input_buffer(j_decompress_ptr jpeg) +boolean fill_input_buffer(j_decompress_ptr jpeg) { SourceManager *src = reinterpret_cast(jpeg->src); src->next_input_byte = src->buffer; src->bytes_in_buffer = src->io->read(reinterpret_cast(src->buffer), sizeof(src->buffer)); - return true; + return TRUE; } void skip_input_data(j_decompress_ptr jpeg, long count) @@ -121,7 +121,7 @@ void JpegLoader::load(Image::Data &data) if(setjmp(priv->err_mgr.jmp)) throw bad_image_data(priv->err_mgr.message); - jpeg_read_header(&priv->jpeg, true); + jpeg_read_header(&priv->jpeg, TRUE); priv->jpeg.out_color_space = JCS_RGB; jpeg_start_decompress(&priv->jpeg); -- 2.45.2