]> git.tdb.fi Git - libs/gui.git/commitdiff
Use libjpeg's boolean type for better compatibility
authorMikko Rasa <tdb@tdb.fi>
Wed, 25 Nov 2015 18:05:53 +0000 (20:05 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 25 Nov 2015 18:05:53 +0000 (20:05 +0200)
Libjpeg 9 changed to an enum boolean type.

source/graphics/jpeg/jpegloader.cpp

index 844446ca50b8b91c33bf16ca7c2a61a4fc9d17eb..38df34848f5b7ad0e04c1574d43a94aee90d4f6c 100644 (file)
@@ -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<SourceManager *>(jpeg->src);
        src->next_input_byte = src->buffer;
        src->bytes_in_buffer = src->io->read(reinterpret_cast<char *>(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);