From 6ad9d013e2eef6fbaf41b7eb7f5279cebf8c29e8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 7 Jan 2014 14:23:46 +0100 Subject: [PATCH] Safer way for syncing pads in Push and Shover router. --- pcbnew/router/pns_router.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 33a512b451..e70fe550bf 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -47,7 +47,7 @@ #include #include -#include +#include #include #include #include @@ -248,11 +248,15 @@ void PNS_ROUTER::SyncWorld() m_world->SetMaxClearance( 1000000 ); // m_board->GetBiggestClearanceValue()); pads = m_board->GetPads(); - BOOST_FOREACH( D_PAD * pad, pads ) { - PNS_ITEM* solid = syncPad( pad ); + for( MODULE* module = m_board->m_Modules; module; module = module->Next() ) + { + for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) + { + PNS_ITEM* solid = syncPad( pad ); - if( solid ) - m_world->Add( solid ); + if( solid ) + m_world->Add( solid ); + } } for( TRACK* t = m_board->m_Track; t; t = t->Next() )