diff options
Diffstat (limited to 'src/resources/imagewriter.cpp')
-rw-r--r-- | src/resources/imagewriter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/imagewriter.cpp b/src/resources/imagewriter.cpp index 7257e1b9..ddf1fbee 100644 --- a/src/resources/imagewriter.cpp +++ b/src/resources/imagewriter.cpp @@ -39,7 +39,7 @@ bool ImageWriter::writePNG(SDL_Surface *surface, const std::string &filename) if (SDL_MUSTLOCK(surface)) SDL_LockSurface(surface); - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png_ptr) { logger->log("Had trouble creating png_structp"); @@ -49,14 +49,14 @@ bool ImageWriter::writePNG(SDL_Surface *surface, const std::string &filename) info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { - png_destroy_write_struct(&png_ptr, (png_infopp)NULL); + png_destroy_write_struct(&png_ptr, (png_infopp)nullptr); logger->log("Could not create png_info"); return false; } if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_write_struct(&png_ptr, (png_infopp)NULL); + png_destroy_write_struct(&png_ptr, (png_infopp)nullptr); logger->log("problem writing to %s", filename.c_str()); return false; } @@ -100,7 +100,7 @@ bool ImageWriter::writePNG(SDL_Surface *surface, const std::string &filename) delete [] row_pointers; - png_destroy_write_struct(&png_ptr, (png_infopp)NULL); + png_destroy_write_struct(&png_ptr, (png_infopp)nullptr); if (SDL_MUSTLOCK(surface)) SDL_UnlockSurface(surface); |