From 9a0f9575b69433528c5444d5ab8760e1492fe358 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 25 Mar 2021 09:12:24 +0100 Subject: [PATCH] Fix minor Coverity warnings --- pcbnew/import_gfx/svg_import_plugin.h | 6 ++++++ pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pcbnew/import_gfx/svg_import_plugin.h b/pcbnew/import_gfx/svg_import_plugin.h index b1371b61ee..7030837bb8 100644 --- a/pcbnew/import_gfx/svg_import_plugin.h +++ b/pcbnew/import_gfx/svg_import_plugin.h @@ -38,6 +38,12 @@ class SVG_IMPORT_PLUGIN : public GRAPHICS_IMPORT_PLUGIN { public: + SVG_IMPORT_PLUGIN(): + GRAPHICS_IMPORT_PLUGIN(), + m_parsedImage( nullptr ) + { + } + const wxString GetName() const override { return "Scalable Vector Graphics"; diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp index 3c09a119d1..344f5435bf 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp @@ -3212,8 +3212,8 @@ void CADSTAR_PCB_ARCHIVE_LOADER::calculateZonePriorities() std::map> winningOverlaps; std::set> scheduleInferPriorityFromOutline; - // Calculate the intesection between aPolygon and the outline of aZone - auto intersectionArea = [&]( SHAPE_POLY_SET aPolygon, ZONE* aZone ) -> double + // Calculate the intersection between aPolygon and the outline of aZone + auto intersectionArea = [&]( const SHAPE_POLY_SET& aPolygon, ZONE* aZone ) -> double { SHAPE_POLY_SET intersectShape( *aZone->Outline() );