Browse Source

Creepage: avoid a copy

pcb_db
Fabien Corona 1 year ago
parent
commit
8e859ef84b
  1. 2
      pcbnew/drc/drc_creepage_utils.cpp
  2. 2
      pcbnew/drc/drc_creepage_utils.h

2
pcbnew/drc/drc_creepage_utils.cpp

@ -2123,7 +2123,7 @@ double CreepageGraph::Solve(
return pathWeight;
}
void CreepageGraph::Addshape( const SHAPE& aShape, std::shared_ptr<GraphNode> aConnectTo,
void CreepageGraph::Addshape( const SHAPE& aShape, std::shared_ptr<GraphNode>& aConnectTo,
BOARD_ITEM* aParent )
{
CREEP_SHAPE* newshape = nullptr;

2
pcbnew/drc/drc_creepage_utils.h

@ -698,7 +698,7 @@ public:
void RemoveConnection( std::shared_ptr<GraphConnection>, bool aDelete = false );
void Trim( double aWeightLimit );
void Addshape( const SHAPE& aShape, std::shared_ptr<GraphNode> aConnectTo = nullptr,
void Addshape( const SHAPE& aShape, std::shared_ptr<GraphNode>& aConnectTo,
BOARD_ITEM* aParent = nullptr );
double Solve( std::shared_ptr<GraphNode>& aFrom, std::shared_ptr<GraphNode>& aTo,

Loading…
Cancel
Save