diff options
author | lupoDharkael <izhe@hotmail.es> | 2020-04-02 01:20:12 +0200 |
---|---|---|
committer | lupoDharkael <izhe@hotmail.es> | 2020-04-02 13:38:00 +0200 |
commit | 95a1400a2ac9de1a29fa305f45b928ce8e3044bd (patch) | |
tree | be0cd59e5a90926e9d653fed9f3b1b77e735ca2f /modules/webp | |
parent | 5f11e1557156617366d2c316a97716172103980d (diff) |
Replace NULL with nullptr
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() { |