From ce5f72207e16534b0188f7aeceb89d48b8d0d052 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 20 Apr 2023 15:19:04 -0700 Subject: [PATCH] Cleanup printf bits (cherry picked from commit 990641d2ebcd92d6563941eebb4e4caa2ead2f74) --- pcbnew/connectivity/from_to_cache.cpp | 8 -------- pcbnew/io_mgr.h | 4 +--- pcbnew/pcb_expr_evaluator.h | 7 +------ pcbnew/router/pns_node.cpp | 2 +- pcbnew/router/pns_optimizer.cpp | 1 - pcbnew/router/pns_solid.cpp | 2 -- 6 files changed, 3 insertions(+), 21 deletions(-) diff --git a/pcbnew/connectivity/from_to_cache.cpp b/pcbnew/connectivity/from_to_cache.cpp index 8041a2c735..3b75cd1bf5 100644 --- a/pcbnew/connectivity/from_to_cache.cpp +++ b/pcbnew/connectivity/from_to_cache.cpp @@ -179,7 +179,6 @@ int FROM_TO_CACHE::cacheFromToPaths( const wxString& aFrom, const wxString& aTo if( count >= 2 ) { // fixme: report this somewhere? - //printf("Multiple targets found, aborting...\n"); path.to = nullptr; } } @@ -206,9 +205,6 @@ int FROM_TO_CACHE::cacheFromToPaths( const wxString& aFrom, const wxString& aTo else path.isUnique = false; - - //printf( "%s\n", (const char *) wxString::Format( _("Check path: %s -> %s (net %s)"), path.fromName, path.toName, cnFrom->Parent()->GetNetname() ) ); - if( result == PS_NO_PATH ) continue; @@ -233,7 +229,6 @@ bool FROM_TO_CACHE::IsOnFromToPath( BOARD_CONNECTED_ITEM* aItem, const wxString if( !m_board ) return false; - //printf("Check %d cached paths [%p]\n", m_ftPaths.size(), aItem ); for( int attempt = 0; attempt < 2; attempt++ ) { // item already belongs to path @@ -244,10 +239,7 @@ bool FROM_TO_CACHE::IsOnFromToPath( BOARD_CONNECTED_ITEM* aItem, const wxString nFromTosFound++; if( ftPath.pathItems.count( aItem ) ) - { - // printf("Found cached path for %p [%s->%s]\n", aItem, (const char *)ftPath.fromName, (const char *) ftPath.toName ); return true; - } } } diff --git a/pcbnew/io_mgr.h b/pcbnew/io_mgr.h index e27c25f7eb..44d55ec8b5 100644 --- a/pcbnew/io_mgr.h +++ b/pcbnew/io_mgr.h @@ -551,9 +551,7 @@ public: virtual void FootprintLibOptions( STRING_UTF8_MAP* aListToAppendTo ) const; virtual ~PLUGIN() - { - //printf( "~%s", __func__ ); - }; + {}; #ifndef SWIG diff --git a/pcbnew/pcb_expr_evaluator.h b/pcbnew/pcb_expr_evaluator.h index 43030a3266..1ef2cde365 100644 --- a/pcbnew/pcb_expr_evaluator.h +++ b/pcbnew/pcb_expr_evaluator.h @@ -86,9 +86,7 @@ public: m_itemIndex( aItemIndex ), m_type( LIBEVAL::VT_UNDEFINED ), m_isEnum( false ) - { - //printf("*** CreateVarRef %p %d\n", this, aItemIndex ); - } + {} ~PCB_EXPR_VAR_REF() {}; @@ -123,7 +121,6 @@ public: PCB_EXPR_VAR_REF( aItemIndex ) { SetType( LIBEVAL::VT_STRING ); - //printf("*** CreateVarRef %p %d\n", this, aItemIndex ); } LIBEVAL::VALUE* GetValue( LIBEVAL::CONTEXT* aCtx ) override; @@ -138,7 +135,6 @@ public: PCB_EXPR_VAR_REF( aItemIndex ) { SetType( LIBEVAL::VT_STRING ); - //printf("*** CreateVarRef %p %d\n", this, aItemIndex ); } LIBEVAL::VALUE* GetValue( LIBEVAL::CONTEXT* aCtx ) override; @@ -152,7 +148,6 @@ public: PCB_EXPR_VAR_REF( aItemIndex ) { SetType( LIBEVAL::VT_STRING ); - //printf("*** CreateVarRef %p %d\n", this, aItemIndex ); } LIBEVAL::VALUE* GetValue( LIBEVAL::CONTEXT* aCtx ) override; diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index 78c08a6daf..d4add45cb4 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -99,7 +99,7 @@ NODE::~NODE() for( ITEM* item : toDelete ) { - printf("del item %p type %s\n", item, item->KindStr().c_str() ); + wxLogTrace( wxT( "PNS" ), wxT( "del item %p type %s" ), item, item->KindStr().c_str() ); delete item; } diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index 801d222e77..46ff4afdc9 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -724,7 +724,6 @@ bool OPTIMIZER::mergeStep( LINE* aLine, SHAPE_LINE_CHAIN& aCurrentPath, int step if( !checkColliding( aLine, bypass ) ) { - //printf("Chk-constraints: %d %d\n", n, n+step+1 ); ok = checkConstraints ( n, n + step + 1, aLine, aCurrentPath, bypass ); } diff --git a/pcbnew/router/pns_solid.cpp b/pcbnew/router/pns_solid.cpp index 3b8ff7449d..45ab3dc9ea 100644 --- a/pcbnew/router/pns_solid.cpp +++ b/pcbnew/router/pns_solid.cpp @@ -92,8 +92,6 @@ void SOLID::SetPos( const VECTOR2I& aCenter ) if( m_shape ) m_shape->Move( delta ); - //printf("Hole@%p\n", m_hole); - if( m_hole ) m_hole->Move( delta );