1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Replace NULL with nullptr

This commit is contained in:
lupoDharkael
2020-04-02 01:20:12 +02:00
parent 5f11e15571
commit 95a1400a2a
755 changed files with 5742 additions and 5742 deletions

View File

@@ -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.");