From 3b3e86b968cbca7d52b907f3a7d68d809396dcc2 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 25 Nov 2022 10:43:10 -0800 Subject: [PATCH] Remove structured binding from v6 commit C++17 is only for the master branch --- eeschema/connection_graph.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 143a75c383..7340a53aa7 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -2968,8 +2968,10 @@ bool CONNECTION_GRAPH::ercCheckLabels( const CONNECTION_SUBGRAPH* aSubgraph ) if( pinCount > 1 ) return true; - for( auto& [type, label_vec] : label_map ) + for( auto label_el : label_map ) { + KICAD_T type = label_el.first; + std::vector& label_vec = label_el.second; switch( type ) { @@ -2989,11 +2991,11 @@ bool CONNECTION_GRAPH::ercCheckLabels( const CONNECTION_SUBGRAPH* aSubgraph ) { int allPins = pinCount; - auto it = m_net_name_to_subgraphs_map.find( netName ); + auto net_it = m_net_name_to_subgraphs_map.find( netName ); - if( it != m_net_name_to_subgraphs_map.end() ) + if( net_it != m_net_name_to_subgraphs_map.end() ) { - for( const CONNECTION_SUBGRAPH* neighbor : it->second ) + for( const CONNECTION_SUBGRAPH* neighbor : net_it->second ) { if( neighbor == aSubgraph ) continue;