diff options
Diffstat (limited to 'modules/webp')
-rw-r--r-- | modules/webp/image_loader_webp.cpp | 10 | ||||
-rw-r--r-- | modules/webp/register_types.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/webp/image_loader_webp.cpp b/modules/webp/image_loader_webp.cpp index 09a8985472..0998977bb4 100644 --- a/modules/webp/image_loader_webp.cpp +++ b/modules/webp/image_loader_webp.cpp @@ -52,7 +52,7 @@ static Vector<uint8_t> _webp_lossy_pack(const Ref<Image> &p_image, float p_quali Vector<uint8_t> data = img->get_data(); const uint8_t *r = data.ptr(); - uint8_t *dst_buff = NULL; + uint8_t *dst_buff = nullptr; size_t dst_size = 0; if (img->get_format() == Image::FORMAT_RGB8) { @@ -101,9 +101,9 @@ static Ref<Image> _webp_lossy_unpack(const Vector<uint8_t> &p_buffer) { bool errdec = false; if (features.has_alpha) { - errdec = WebPDecodeRGBAInto(&r[4], size, dst_w, datasize, 4 * features.width) == NULL; + errdec = WebPDecodeRGBAInto(&r[4], size, dst_w, datasize, 4 * features.width) == nullptr; } else { - errdec = WebPDecodeRGBInto(&r[4], size, dst_w, datasize, 3 * features.width) == NULL; + errdec = WebPDecodeRGBInto(&r[4], size, dst_w, datasize, 3 * features.width) == nullptr; } ERR_FAIL_COND_V_MSG(errdec, Ref<Image>(), "Failed decoding WebP image."); @@ -128,9 +128,9 @@ Error webp_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p bool errdec = false; if (features.has_alpha) { - errdec = WebPDecodeRGBAInto(p_buffer, p_buffer_len, dst_w, datasize, 4 * features.width) == NULL; + errdec = WebPDecodeRGBAInto(p_buffer, p_buffer_len, dst_w, datasize, 4 * features.width) == nullptr; } else { - errdec = WebPDecodeRGBInto(p_buffer, p_buffer_len, dst_w, datasize, 3 * features.width) == NULL; + errdec = WebPDecodeRGBInto(p_buffer, p_buffer_len, dst_w, datasize, 3 * features.width) == nullptr; } ERR_FAIL_COND_V_MSG(errdec, ERR_FILE_CORRUPT, "Failed decoding WebP image."); diff --git a/modules/webp/register_types.cpp b/modules/webp/register_types.cpp index 12a0c05f44..fe945b01d4 100644 --- a/modules/webp/register_types.cpp +++ b/modules/webp/register_types.cpp @@ -32,7 +32,7 @@ #include "image_loader_webp.h" -static ImageLoaderWEBP *image_loader_webp = NULL; +static ImageLoaderWEBP *image_loader_webp = nullptr; void register_webp_types() { |