]> git.jsancho.org Git - lugaru.git/commitdiff
ImageIO: fix invalid conversion
authorRomain Naour <romain.naour@gmail.com>
Sun, 12 Feb 2017 20:17:44 +0000 (21:17 +0100)
committerRomain Naour <romain.naour@gmail.com>
Sun, 12 Feb 2017 22:38:11 +0000 (23:38 +0100)
Fixes:
Source/Utils/ImageIO.cpp:125:27: error: invalid conversion from 'int' to 'boolean' [-fpermissive]
     cinfo.quantize_colors = 0;
                           ^

quantize_colors type is bool, so it must be initialized to TRUE or FALSE.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Source/Utils/ImageIO.cpp

index 706c201bce872b7688e790d871a82e8d0837b12b..c19a63e5f6e65878b15b95e54477787a11196c26 100644 (file)
@@ -122,7 +122,7 @@ static bool load_jpg(const char* file_name, ImageRec& tex)
     (void)jpeg_read_header(&cinfo, TRUE);
 
     cinfo.out_color_space = JCS_RGB;
-    cinfo.quantize_colors = 0;
+    cinfo.quantize_colors = FALSE;
     (void)jpeg_calc_output_dimensions(&cinfo);
     (void)jpeg_start_decompress(&cinfo);