diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp index 15677b829e..c22440ea72 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp @@ -2861,11 +2861,11 @@ std::vector CADSTAR_PCB_ARCHIVE_LOADER::getShapesFromVertices( const VECTOR2I& aTransformCentre, const bool& aMirrorInvert ) { - std::vector drawSegments; + std::vector shapes; if( aCadstarVertices.size() < 2 ) //need at least two points to draw a segment! (unlikely but possible to have only one) - return drawSegments; + return shapes; const VERTEX* prev = &aCadstarVertices.at( 0 ); // first one should always be a point vertex const VERTEX* cur; @@ -2873,13 +2873,13 @@ std::vector CADSTAR_PCB_ARCHIVE_LOADER::getShapesFromVertices( for( size_t i = 1; i < aCadstarVertices.size(); i++ ) { cur = &aCadstarVertices.at( i ); - drawSegments.push_back( getShapeFromVertex( prev->End, *cur, aContainer, aCadstarGroupID, - aMoveVector, aRotationAngle, aScalingFactor, - aTransformCentre, aMirrorInvert ) ); + shapes.push_back( getShapeFromVertex( prev->End, *cur, aContainer, aCadstarGroupID, + aMoveVector, aRotationAngle, aScalingFactor, + aTransformCentre, aMirrorInvert ) ); prev = cur; } - return drawSegments; + return shapes; } @@ -3019,9 +3019,9 @@ SHAPE_POLY_SET CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape( const SHA //cleanup for( PCB_SHAPE* shape : outlineShapes ) - delete shape; + delete shape; - for( CUTOUT cutout : aCadstarShape.Cutouts ) + for( const CUTOUT& cutout : aCadstarShape.Cutouts ) { std::vector cutoutShapes = getShapesFromVertices( cutout.Vertices, aContainer, noGroup, aMoveVector, @@ -3056,7 +3056,7 @@ SHAPE_POLY_SET CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape( const SHA } -SHAPE_LINE_CHAIN CADSTAR_PCB_ARCHIVE_LOADER::getLineChainFromShapes( const std::vector aShapes ) +SHAPE_LINE_CHAIN CADSTAR_PCB_ARCHIVE_LOADER::getLineChainFromShapes( const std::vector& aShapes ) { SHAPE_LINE_CHAIN lineChain; @@ -3101,7 +3101,7 @@ SHAPE_LINE_CHAIN CADSTAR_PCB_ARCHIVE_LOADER::getLineChainFromShapes( const std:: std::vector CADSTAR_PCB_ARCHIVE_LOADER::makeTracksFromShapes( - const std::vector aShapes, + const std::vector& aShapes, BOARD_ITEM_CONTAINER* aParentContainer, NETINFO_ITEM* aNet, PCB_LAYER_ID aLayerOverride, int aWidthOverride ) @@ -3363,7 +3363,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::applyRouteOffset( VECTOR2I* aPointToOffset void CADSTAR_PCB_ARCHIVE_LOADER:: applyTextCode( EDA_TEXT* aKiCadText, - const TEXTCODE_ID& aCadstarTextCodeID ) + const TEXTCODE_ID& aCadstarTextCodeID ) { TEXTCODE tc = getTextCode( aCadstarTextCodeID ); diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h index efe6afae83..6fbfa86b2d 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.h @@ -367,7 +367,7 @@ private: * @param aShapes * @return */ - SHAPE_LINE_CHAIN getLineChainFromShapes( const std::vector aShapes ); + SHAPE_LINE_CHAIN getLineChainFromShapes( const std::vector& aShapes ); /** * @brief Returns a vector of pointers to TRACK/ARC objects. Caller owns the objects @@ -381,7 +381,7 @@ private: * width in the shapes * @return */ - std::vector makeTracksFromShapes( const std::vector aShapes, + std::vector makeTracksFromShapes( const std::vector& aShapes, BOARD_ITEM_CONTAINER* aParentContainer, NETINFO_ITEM* aNet = nullptr, PCB_LAYER_ID aLayerOverride = UNDEFINED_LAYER, diff --git a/qa/pcbnew_utils/board_test_utils.cpp b/qa/pcbnew_utils/board_test_utils.cpp index 42921e1a74..e7ad876106 100644 --- a/qa/pcbnew_utils/board_test_utils.cpp +++ b/qa/pcbnew_utils/board_test_utils.cpp @@ -48,7 +48,7 @@ namespace KI_TEST { BOARD_DUMPER::BOARD_DUMPER() : - m_dump_boards( std::getenv( "KICAD_TEST_DUMP_BOARD_FILES" ) ) + m_dump_boards( true ) { }