diff options
Diffstat (limited to 'modules/svg')
-rw-r--r-- | modules/svg/SCsub | 6 | ||||
-rw-r--r-- | modules/svg/config.py | 1 | ||||
-rw-r--r-- | modules/svg/image_loader_svg.cpp | 4 | ||||
-rw-r--r-- | modules/svg/image_loader_svg.h | 2 | ||||
-rw-r--r-- | modules/svg/register_types.cpp | 2 |
5 files changed, 8 insertions, 7 deletions
diff --git a/modules/svg/SCsub b/modules/svg/SCsub index 7961d1f33e..0bfba34fe5 100644 --- a/modules/svg/SCsub +++ b/modules/svg/SCsub @@ -1,14 +1,14 @@ #!/usr/bin/env python -Import('env') -Import('env_modules') +Import("env") +Import("env_modules") env_svg = env_modules.Clone() # Thirdparty source files thirdparty_dir = "#thirdparty/nanosvg/" thirdparty_sources = [ - "nanosvg.cc" + "nanosvg.cc", ] thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] diff --git a/modules/svg/config.py b/modules/svg/config.py index 1c8cd12a2d..d22f9454ed 100644 --- a/modules/svg/config.py +++ b/modules/svg/config.py @@ -1,5 +1,6 @@ def can_build(env, platform): return True + def configure(env): pass 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<Image> p_image, const Vector<uint8_t> *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<Image> p_image, const Vector<uint8_t> *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<Image> p_image, const char *p_svg_str, float p_scale, bool upsample, bool convert_colors = false); virtual Error load_image(Ref<Image> 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() { |