From 61e75a838b6ee5a8667351cde5844edcc5ddd9c8 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Tue, 23 Feb 2021 22:48:30 +0100 Subject: [PATCH] router: replace large stack variables with std::array --- pcbnew/router/pns_node.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index cd2b7faf0b..e05bdca8e6 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -914,9 +914,9 @@ const LINE NODE::AssembleLine( LINKED_ITEM* aSeg, int* aOriginSegmentIndex, { const int MaxVerts = 1024 * 16; - VECTOR2I corners[MaxVerts + 1]; - LINKED_ITEM* segs[MaxVerts + 1]; - bool arcReversed[MaxVerts + 1]; + std::array corners; + std::array segs; + std::array arcReversed; LINE pl; bool guardHit = false; @@ -928,12 +928,12 @@ const LINE NODE::AssembleLine( LINKED_ITEM* aSeg, int* aOriginSegmentIndex, pl.SetNet( aSeg->Net() ); pl.SetOwner( this ); - followLine( aSeg, false, i_start, MaxVerts, corners, segs, arcReversed, + followLine( aSeg, false, i_start, MaxVerts, corners.data(), segs.data(), arcReversed.data(), guardHit, aStopAtLockedJoints ); if( !guardHit ) { - followLine( aSeg, true, i_end, MaxVerts, corners, segs, arcReversed, guardHit, + followLine( aSeg, true, i_end, MaxVerts, corners.data(), segs.data(), arcReversed.data(), guardHit, aStopAtLockedJoints ); }