From 76bbb71402d6c25dbbd979d4f4019e2ecb326dee Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 6 Apr 2020 12:41:52 +0100 Subject: [PATCH] Correct some formatting issues. --- common/page_layout/ws_painter.cpp | 26 +++++++++++++------------- eeschema/sch_field.cpp | 18 +++++++++--------- pcbnew/class_text_mod.cpp | 6 +++--- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/common/page_layout/ws_painter.cpp b/common/page_layout/ws_painter.cpp index 1d04927d9c..c74332bfc5 100644 --- a/common/page_layout/ws_painter.cpp +++ b/common/page_layout/ws_painter.cpp @@ -92,66 +92,66 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase ) std::function wsResolver = [ this ]( wxString* token ) -> bool { - if( token->IsSameAs( wxT( "KICAD_VERSION" ) )) + if( token->IsSameAs( wxT( "KICAD_VERSION" ) ) ) { *token = wxString::Format( wxT( "%s%s %s" ), productName, Pgm().App().GetAppName(), - GetBuildVersion()); + GetBuildVersion() ); return true; } - else if( token->IsSameAs( wxT( "#" ) )) + else if( token->IsSameAs( wxT( "#" ) ) ) { *token = wxString::Format( wxT( "%d" ), m_sheetNumber ); return true; } - else if( token->IsSameAs( wxT( "##" ) )) + else if( token->IsSameAs( wxT( "##" ) ) ) { *token = wxString::Format( wxT( "%d" ), m_sheetCount ); return true; } - else if( token->IsSameAs( wxT( "SHEETNAME" ) )) + else if( token->IsSameAs( wxT( "SHEETNAME" ) ) ) { *token = m_sheetFullName; return true; } - else if( token->IsSameAs( wxT( "FILENAME" ) )) + else if( token->IsSameAs( wxT( "FILENAME" ) ) ) { wxFileName fn( m_fileName ); *token = fn.GetFullName(); return true; } - else if( token->IsSameAs( wxT( "PAPER" ) )) + else if( token->IsSameAs( wxT( "PAPER" ) ) ) { *token = m_paperFormat ? *m_paperFormat : wxString( "" ); return true; } - else if( token->IsSameAs( wxT( "LAYER" ) )) + else if( token->IsSameAs( wxT( "LAYER" ) ) ) { *token = m_sheetLayer ? *m_sheetLayer : wxString( "" ); return true; } - else if( token->IsSameAs( wxT( "ISSUE_DATE" ) )) + else if( token->IsSameAs( wxT( "ISSUE_DATE" ) ) ) { *token = m_titleBlock ? m_titleBlock->GetDate() : wxString( "" ); return true; } - else if( token->IsSameAs( wxT( "REVISION" ) )) + else if( token->IsSameAs( wxT( "REVISION" ) ) ) { *token = m_titleBlock ? m_titleBlock->GetRevision() : wxString( "" ); return true; } - else if( token->IsSameAs( wxT( "TITLE" ) )) + else if( token->IsSameAs( wxT( "TITLE" ) ) ) { *token = m_titleBlock ? m_titleBlock->GetTitle() : wxString( "" ); return true; } - else if( token->IsSameAs( wxT( "COMPANY" ) )) + else if( token->IsSameAs( wxT( "COMPANY" ) ) ) { *token = m_titleBlock ? m_titleBlock->GetCompany() : wxString( "" ); return true; } - else if( token->Left( token->Len() - 1 ).IsSameAs( wxT( "COMMENT" ) )) + else if( token->Left( token->Len() - 1 ).IsSameAs( wxT( "COMMENT" ) ) ) { wxChar c = token->Last(); diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index 3586bad830..3de4fb7283 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -82,7 +82,7 @@ wxString SCH_FIELD::GetShownText() const for( int i = 0; i < MANDATORY_FIELDS; ++i ) { - if( token->IsSameAs( fields[ i ].GetCanonicalName().Upper())) + if( token->IsSameAs( fields[ i ].GetCanonicalName().Upper() ) ) { // silently drop recursive references if( &fields[ i ] == this ) @@ -96,8 +96,8 @@ wxString SCH_FIELD::GetShownText() const for( size_t i = MANDATORY_FIELDS; i < fields.size(); ++i ) { - if( token->IsSameAs( fields[ i ].GetName()) - || token->IsSameAs( fields[ i ].GetName().Upper())) + if( token->IsSameAs( fields[ i ].GetName() ) + || token->IsSameAs( fields[ i ].GetName().Upper() ) ) { // silently drop recursive references if( &fields[ i ] == this ) @@ -109,7 +109,7 @@ wxString SCH_FIELD::GetShownText() const } } - if( token->IsSameAs( wxT( "FOOTPRINT_LIBRARY" ) )) + if( token->IsSameAs( wxT( "FOOTPRINT_LIBRARY" ) ) ) { SCH_FIELD& f = component->GetFields()[ FOOTPRINT ]; wxArrayString parts = wxSplit( f.GetText(), ':' ); @@ -117,7 +117,7 @@ wxString SCH_FIELD::GetShownText() const *token = parts[ 0 ]; return true; } - else if( token->IsSameAs( wxT( "FOOTPRINT_NAME" ) )) + else if( token->IsSameAs( wxT( "FOOTPRINT_NAME" ) ) ) { SCH_FIELD& f = component->GetFields()[ FOOTPRINT ]; wxArrayString parts = wxSplit( f.GetText(), ':' ); @@ -125,9 +125,9 @@ wxString SCH_FIELD::GetShownText() const *token = parts[ std::min( 1, (int) parts.size() - 1 ) ]; return true; } - else if( token->IsSameAs( wxT( "UNIT" ) )) + else if( token->IsSameAs( wxT( "UNIT" ) ) ) { - *token = LIB_PART::SubReference( component->GetUnit()); + *token = LIB_PART::SubReference( component->GetUnit() ); return true; } @@ -142,7 +142,7 @@ wxString SCH_FIELD::GetShownText() const for( int i = 0; i < SHEET_MANDATORY_FIELDS; ++i ) { - if( token->IsSameAs( fields[ i ].GetCanonicalName().Upper())) + if( token->IsSameAs( fields[ i ].GetCanonicalName().Upper() ) ) { // silently drop recursive references if( &fields[ i ] == this ) @@ -156,7 +156,7 @@ wxString SCH_FIELD::GetShownText() const for( size_t i = SHEET_MANDATORY_FIELDS; i < fields.size(); ++i ) { - if( token->IsSameAs( fields[ i ].GetName())) + if( token->IsSameAs( fields[ i ].GetName() ) ) { // silently drop recursive references if( &fields[ i ] == this ) diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 88474fa045..c694f1b184 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -501,17 +501,17 @@ wxString TEXTE_MODULE::GetShownText() const { if( module ) { - if( token->IsSameAs( wxT( "REFERENCE" ) )) + if( token->IsSameAs( wxT( "REFERENCE" ) ) ) { *token = module->GetReference(); return true; } - else if( token->IsSameAs( wxT( "VALUE" ) )) + else if( token->IsSameAs( wxT( "VALUE" ) ) ) { *token = module->GetValue(); return true; } - else if( token->IsSameAs( wxT( "LAYER" ) )) + else if( token->IsSameAs( wxT( "LAYER" ) ) ) { *token = GetLayerName(); return true;