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 --- modules/svg/image_loader_svg.cpp | 4 ++-- modules/svg/image_loader_svg.h | 2 +- modules/svg/register_types.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/svg') diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp index e9d30d015a..3c2784f8de 100644 --- a/modules/svg/image_loader_svg.cpp +++ b/modules/svg/image_loader_svg.cpp @@ -65,7 +65,7 @@ inline void change_nsvg_paint_color(NSVGpaint *p_paint, const uint32_t p_old, co void ImageLoaderSVG::_convert_colors(NSVGimage *p_svg_image) { - for (NSVGshape *shape = p_svg_image->shapes; shape != NULL; shape = shape->next) { + for (NSVGshape *shape = p_svg_image->shapes; shape != nullptr; shape = shape->next) { for (int i = 0; i < replace_colors.old_colors.size(); i++) { change_nsvg_paint_color(&(shape->stroke), replace_colors.old_colors[i], replace_colors.new_colors[i]); @@ -98,7 +98,7 @@ Error ImageLoaderSVG::_create_image(Ref p_image, const Vector *p NSVGimage *svg_image; const uint8_t *src_r = p_data->ptr(); svg_image = nsvgParse((char *)src_r, "px", 96); - if (svg_image == NULL) { + if (svg_image == nullptr) { ERR_PRINT("SVG Corrupted"); return ERR_FILE_CORRUPT; } diff --git a/modules/svg/image_loader_svg.h b/modules/svg/image_loader_svg.h index def2885199..0fa4a0fdf4 100644 --- a/modules/svg/image_loader_svg.h +++ b/modules/svg/image_loader_svg.h @@ -63,7 +63,7 @@ class ImageLoaderSVG : public ImageFormatLoader { static Error _create_image(Ref p_image, const Vector *p_data, float p_scale, bool upsample, bool convert_colors = false); public: - static void set_convert_colors(Dictionary *p_replace_color = NULL); + static void set_convert_colors(Dictionary *p_replace_color = nullptr); static Error create_image_from_string(Ref p_image, const char *p_svg_str, float p_scale, bool upsample, bool convert_colors = false); virtual Error load_image(Ref p_image, FileAccess *f, bool p_force_linear, float p_scale); diff --git a/modules/svg/register_types.cpp b/modules/svg/register_types.cpp index b0782dae88..37875313aa 100644 --- a/modules/svg/register_types.cpp +++ b/modules/svg/register_types.cpp @@ -32,7 +32,7 @@ #include "image_loader_svg.h" -static ImageLoaderSVG *image_loader_svg = NULL; +static ImageLoaderSVG *image_loader_svg = nullptr; void register_svg_types() { -- cgit v1.2.3