From 95a1400a2ac9de1a29fa305f45b928ce8e3044bd Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Thu, 2 Apr 2020 01:20:12 +0200 Subject: Replace NULL with nullptr --- drivers/png/png_driver_common.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/png') diff --git a/drivers/png/png_driver_common.cpp b/drivers/png/png_driver_common.cpp index efd488fd5c..f17abcb54c 100644 --- a/drivers/png/png_driver_common.cpp +++ b/drivers/png/png_driver_common.cpp @@ -110,7 +110,7 @@ Error png_to_image(const uint8_t *p_source, size_t p_size, Ref p_image) { uint8_t *writer = buffer.ptrw(); // read image data to buffer and release libpng resources - success = png_image_finish_read(&png_img, NULL, writer, stride, NULL); + success = png_image_finish_read(&png_img, nullptr, writer, stride, nullptr); ERR_FAIL_COND_V_MSG(check_error(png_img), ERR_FILE_CORRUPT, png_img.message); ERR_FAIL_COND_V(!success, ERR_FILE_CORRUPT); @@ -175,7 +175,7 @@ Error image_to_png(const Ref &p_image, Vector &p_buffer) { uint8_t *writer = p_buffer.ptrw(); success = png_image_write_to_memory(&png_img, &writer[buffer_offset], - &compressed_size, 0, reader, 0, NULL); + &compressed_size, 0, reader, 0, nullptr); ERR_FAIL_COND_V_MSG(check_error(png_img), FAILED, png_img.message); } if (!success) { @@ -189,7 +189,7 @@ Error image_to_png(const Ref &p_image, Vector &p_buffer) { uint8_t *writer = p_buffer.ptrw(); success = png_image_write_to_memory(&png_img, &writer[buffer_offset], - &compressed_size, 0, reader, 0, NULL); + &compressed_size, 0, reader, 0, nullptr); ERR_FAIL_COND_V_MSG(check_error(png_img), FAILED, png_img.message); ERR_FAIL_COND_V(!success, FAILED); } -- cgit v1.2.3