From 90a44058dc80a1d4911ce7cf9f2e21fba93f83b6 Mon Sep 17 00:00:00 2001 From: Marco Rubin <20150305+Rubo3@users.noreply.github.com> Date: Fri, 25 Feb 2022 16:32:52 +0000 Subject: [PATCH] Remove constness from svgFragment (#95) * Remove constness from svgFragment * Remove constness from svgFragment * Use proper name --- include/vkvg-svg.h | 4 ++-- src/nsvg/vkvg_nsvg.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/vkvg-svg.h b/include/vkvg-svg.h index 288dd37..4f16cc8 100644 --- a/include/vkvg-svg.h +++ b/include/vkvg-svg.h @@ -54,7 +54,7 @@ VkvgSurface vkvg_surface_create_from_svg(VkvgDevice dev, uint32_t width, uint32_ * @return The new vkvg surface with the parsed SVG fragment as content, or null if an error occured. */ vkvg_public -VkvgSurface vkvg_surface_create_from_svg_fragment(VkvgDevice dev, uint32_t width, uint32_t height, const char* svgFragment); +VkvgSurface vkvg_surface_create_from_svg_fragment(VkvgDevice dev, uint32_t width, uint32_t height, char* svgFragment); vkvg_public void vkvg_svg_get_dimensions (VkvgSvg svg, uint32_t* width, uint32_t* height); @@ -63,7 +63,7 @@ vkvg_public VkvgSvg vkvg_svg_load (const char* svgFilePath); vkvg_public -VkvgSvg vkvg_svg_load_fragment (const char* svgFragment); +VkvgSvg vkvg_svg_load_fragment (char* svgFragment); vkvg_public void vkvg_svg_render (VkvgSvg svg, VkvgContext ctx, const char* id); diff --git a/src/nsvg/vkvg_nsvg.c b/src/nsvg/vkvg_nsvg.c index 8cdc16c..0c34450 100644 --- a/src/nsvg/vkvg_nsvg.c +++ b/src/nsvg/vkvg_nsvg.c @@ -65,13 +65,13 @@ VkvgSurface _svg_load (VkvgDevice dev, NSVGimage* svg) { VkvgSurface vkvg_surface_create_from_svg (VkvgDevice dev, uint32_t width, uint32_t height, const char* filePath) { return _svg_load(dev, nsvgParseFromFile(filePath, "px", (float)dev->hdpi)); } -VkvgSurface vkvg_surface_create_from_svg_fragment (VkvgDevice dev, uint32_t width, uint32_t height,const char* fragment) { - return _svg_load(dev, nsvgParse(fragment, "px", (float)dev->hdpi)); +VkvgSurface vkvg_surface_create_from_svg_fragment (VkvgDevice dev, uint32_t width, uint32_t height, char* svgFragment) { + return _svg_load(dev, nsvgParse(svgFragment, "px", (float)dev->hdpi)); } VkvgSvg vkvg_svg_load (const char* svgFilePath) { return nsvgParseFromFile(svgFilePath, "px", 96.0f); } -VkvgSvg vkvg_svg_load_fragment (const char* svgFragment) { +VkvgSvg vkvg_svg_load_fragment (char* svgFragment) { return nsvgParse (svgFragment, "px", 96.0f); } void vkvg_svg_destroy (VkvgSvg svg) { -- 2.47.3