Ticket #4073: fix-c++14-compat.patch

File fix-c++14-compat.patch, 1.1 KB (added by susnux, 8 years ago)

Patch: Fix compatibility with c++14 needed for gcc6

  • libraries/source/nvtt/src/src/nvimage/ImageIO.cpp

    diff -Nur 0ad-0.0.20-alpha/libraries/source/nvtt/src/src/nvimage/ImageIO.cpp new/libraries/source/nvtt/src/src/nvimage/ImageIO.cpp
    old new  
    621621    png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
    622622    if (png_ptr == NULL) {
    623623    //  nvDebug( "*** LoadPNG: Error allocating read buffer in file '%s'.\n", name );
    624         return false;
     624        return NULL;
    625625    }
    626626
    627627    // Allocate/initialize a memory block for the image information
     
    629629    if (info_ptr == NULL) {
    630630        png_destroy_read_struct(&png_ptr, NULL, NULL);
    631631    //  nvDebug( "*** LoadPNG: Error allocating image information for '%s'.\n", name );
    632         return false;
     632        return NULL;
    633633    }
    634634
    635635    // Set up the error handling
    636636    if (setjmp(png_jmpbuf(png_ptr))) {
    637637        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
    638638    //  nvDebug( "*** LoadPNG: Error reading png file '%s'.\n", name );
    639         return false;
     639        return NULL;
    640640    }
    641641
    642642    // Set up the I/O functions.