You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-...

59 lines
1.5 KiB

This patch fixes cpp14 compilation errors.
Gentoo-bug: 594938
--- a/src/nvimage/ImageIO.cpp
+++ b/src/nvimage/ImageIO.cpp
@@ -135,7 +135,7 @@
StdInputStream stream(fileName);
if (stream.isError()) {
- return false;
+ return NULL;
}
return loadFloat(fileName, stream);
@@ -233,7 +233,7 @@
case TGA_TYPE_INDEXED:
if( tga.colormap_type!=1 || tga.colormap_size!=24 || tga.colormap_length>256 ) {
nvDebug( "*** ImageIO::loadTGA: Error, only 24bit paletted images are supported.\n" );
- return false;
+ return NULL;
}
pal = true;
break;
@@ -254,7 +254,7 @@
default:
nvDebug( "*** ImageIO::loadTGA: Error, unsupported image type.\n" );
- return false;
+ return NULL;
}
const uint pixel_size = (tga.pixel_size/8);
@@ -621,7 +621,7 @@
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (png_ptr == NULL) {
// nvDebug( "*** LoadPNG: Error allocating read buffer in file '%s'.\n", name );
- return false;
+ return NULL;
}
// Allocate/initialize a memory block for the image information
@@ -629,14 +629,14 @@
if (info_ptr == NULL) {
png_destroy_read_struct(&png_ptr, NULL, NULL);
// nvDebug( "*** LoadPNG: Error allocating image information for '%s'.\n", name );
- return false;
+ return NULL;
}
// Set up the error handling
if (setjmp(png_jmpbuf(png_ptr))) {
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
// nvDebug( "*** LoadPNG: Error reading png file '%s'.\n", name );
- return false;
+ return NULL;
}
// Set up the I/O functions.