0ad/fix-c++14-compat.patch

30 lines
1.1 KiB
Diff

diff -Nur 0ad-0.0.20-alpha/libraries/source/nvtt/src/src/nvimage/ImageIO.cpp new/libraries/source/nvtt/src/src/nvimage/ImageIO.cpp
--- 0ad-0.0.20-alpha/libraries/source/nvtt/src/src/nvimage/ImageIO.cpp 2015-02-22 00:58:01.000000000 +0100
+++ new/libraries/source/nvtt/src/src/nvimage/ImageIO.cpp 2016-06-27 01:30:36.049140952 +0200
@@ -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.