From: Mikko Rasa Date: Wed, 25 Nov 2015 18:05:53 +0000 (+0200) Subject: Use libjpeg's boolean type for better compatibility X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=2438c3cdd14087bfc3375ed1f5521ad5c0c09bbc;p=libs%2Fgui.git Use libjpeg's boolean type for better compatibility Libjpeg 9 changed to an enum boolean type. --- 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);