diff --git a/examples/svg2png.cpp b/examples/svg2png.cpp index 6fadcd9..3c0c83e 100644 --- a/examples/svg2png.cpp +++ b/examples/svg2png.cpp @@ -38,7 +38,7 @@ bool setup(int argc, char** argv, std::string& filename, std::uint32_t& width, s return argc > 1; } -int main(int argc, char** argv) +int main(int argc, char* argv[]) { std::string filename; std::uint32_t width = 0, height = 0; diff --git a/meson.build b/meson.build index a8ecd96..d6f41c0 100644 --- a/meson.build +++ b/meson.build @@ -33,7 +33,6 @@ lunasvg_lib = library('lunasvg', lunasvg_sources, include_directories: include_directories('include', 'source'), dependencies: plutovg_dep, version: meson.project_version(), - c_args: ['-DLUNASVG_BUILD'] + lunasvg_compile_args, cpp_args: ['-DLUNASVG_BUILD'] + lunasvg_compile_args, gnu_symbol_visibility: 'hidden', install: true diff --git a/source/svgpaintelement.cpp b/source/svgpaintelement.cpp index 276673c..4f53ab3 100644 --- a/source/svgpaintelement.cpp +++ b/source/svgpaintelement.cpp @@ -116,8 +116,7 @@ static GradientStops buildGradientStops(const SVGGradientElement* element, float { GradientStops gradientStops; for(const auto& child : element->children()) { - auto element = toSVGElement(child); - if(element && element->id() == ElementID::Stop) { + if(auto element = toSVGElement(child); element && element->id() == ElementID::Stop) { auto stopElement = static_cast(element); gradientStops.push_back(stopElement->gradientStop(opacity)); }