From ac539b9578f797c16c11b7db927a7fcd16fe74e8 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 17 Jan 2015 09:01:16 +0100 Subject: [PATCH] Minor and very minors fixes: move -DKICAD_USE_WEBKIT definition to the main CMakeLists.txt. Remove duplicate semi-colon at end of some lines. --- CMakeLists.txt | 1 + common/base_units.cpp | 2 +- common/dialog_shim.cpp | 6 +++--- common/dialogs/dialog_image_editor.cpp | 2 +- common/single_top.cpp | 4 ++-- cvpcb/CMakeLists.txt | 1 - cvpcb/readwrite_dlgs.cpp | 2 +- eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp | 2 +- gerbview/class_gerbview_layer_widget.cpp | 2 +- gerbview/export_to_pcbnew.cpp | 2 +- include/class_title_block.h | 2 +- kicad/kicad.cpp | 2 +- pagelayout_editor/properties_frame.cpp | 2 +- pcb_calculator/attenuators.cpp | 6 ++++-- pcbnew/CMakeLists.txt | 1 - pcbnew/class_pad.cpp | 2 +- pcbnew/class_pad.h | 2 +- pcbnew/dialogs/dialog_design_rules.cpp | 4 ++-- pcbnew/dialogs/dialog_freeroute_exchange.cpp | 2 +- pcbnew/github/github_getliblist.cpp | 2 +- pcbnew/ratsnest.cpp | 2 +- 21 files changed, 26 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af87f4be88..ecf6608d50 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -421,6 +421,7 @@ set( wxWidgets_CONFIG_OPTIONS --static=no ) if( KICAD_USE_WEBKIT AND BUILD_GITHUB_PLUGIN ) set( webkitlib "webview" ) + add_definitions( -DKICAD_USE_WEBKIT ) else() set( webkitlib "" ) endif() diff --git a/common/base_units.cpp b/common/base_units.cpp index 5b79ab5746..846c8b0eb3 100644 --- a/common/base_units.cpp +++ b/common/base_units.cpp @@ -83,7 +83,7 @@ std::string Double2Str( double aValue ) len = sprintf( buf, "%.16g", aValue ); } - return std::string( buf, len );; + return std::string( buf, len ); } diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index 1403c141c4..881fb479f9 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -411,14 +411,14 @@ public: // wxModalEventLoop depends on this (so we can't just use ON_BLOCK_EXIT or // something similar here) #if wxUSE_EXCEPTIONS - for ( ;; ) + for( ; ; ) { try { #endif // wxUSE_EXCEPTIONS // this is the event loop itself - for ( ;; ) + for( ; ; ) { // generate and process idle events for as long as we don't // have anything else to do @@ -446,7 +446,7 @@ public: // handlers endlessly generate new events but they shouldn't do // this in a well-behaved program and we shouldn't just discard the // events we already have, they might be important. - for ( ;; ) + for( ; ; ) { bool hasMoreEvents = false; if ( wxTheApp && wxTheApp->HasPendingEvents() ) diff --git a/common/dialogs/dialog_image_editor.cpp b/common/dialogs/dialog_image_editor.cpp index 212953c724..9d0edd24a8 100644 --- a/common/dialogs/dialog_image_editor.cpp +++ b/common/dialogs/dialog_image_editor.cpp @@ -41,7 +41,7 @@ DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem m_buttonUndoLast->Enable( false ); wxString msg; msg.Printf( wxT("%f"), m_workingImage->m_Scale ); - m_textCtrlScale->SetValue( msg );; + m_textCtrlScale->SetValue( msg ); GetSizer()->SetSizeHints( this ); Layout(); diff --git a/common/single_top.cpp b/common/single_top.cpp index 7a7a3120fe..8addf581b6 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -125,7 +125,7 @@ struct APP_SINGLE_TOP : public wxApp { wxLogError( wxT( "Unhandled exception class: %s what: %s" ), GetChars( FROM_UTF8( typeid(e).name() )), - GetChars( FROM_UTF8( e.what() ) ) );; + GetChars( FROM_UTF8( e.what() ) ) ); } catch( const IO_ERROR& ioe ) { @@ -158,7 +158,7 @@ struct APP_SINGLE_TOP : public wxApp { wxLogError( wxT( "Unhandled exception class: %s what: %s" ), GetChars( FROM_UTF8( typeid(e).name() )), - GetChars( FROM_UTF8( e.what() ) ) );; + GetChars( FROM_UTF8( e.what() ) ) ); } catch( const IO_ERROR& ioe ) { diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 7c701b382b..2bb481b874 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -10,7 +10,6 @@ add_definitions( -DCVPCB ) if( KICAD_USE_WEBKIT AND BUILD_GITHUB_PLUGIN ) set( WEBVIEWER_WXLIB "webviewer" ) - add_definitions( -DKICAD_USE_WEBKIT ) endif() diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 8f0bc7dca8..61c162b98e 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -306,7 +306,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() if( component->GetFPID().IsLegacy() || component->GetAltFPID().IsLegacy()) continue; - m_indexes.push_back( ii );; + m_indexes.push_back( ii ); } // If a n assignment conflict is found, diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index 488fa83715..d42752ee72 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -550,7 +550,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers() if( !it->m_Visible ) fld.SetVisible( false ); else - fld.SetVisible( true );; + fld.SetVisible( true ); } else { diff --git a/gerbview/class_gerbview_layer_widget.cpp b/gerbview/class_gerbview_layer_widget.cpp index 0e543393dd..e0968ac722 100644 --- a/gerbview/class_gerbview_layer_widget.cpp +++ b/gerbview/class_gerbview_layer_widget.cpp @@ -172,7 +172,7 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) { int rowCount; int menuId = event.GetId(); - bool visible = (menuId == ID_SHOW_ALL_LAYERS) ? true : false;; + bool visible = (menuId == ID_SHOW_ALL_LAYERS) ? true : false; long visibleLayers = 0; bool force_active_layer_visible; diff --git a/gerbview/export_to_pcbnew.cpp b/gerbview/export_to_pcbnew.cpp index a2694b366e..51c1cfc292 100644 --- a/gerbview/export_to_pcbnew.cpp +++ b/gerbview/export_to_pcbnew.cpp @@ -172,7 +172,7 @@ void GERBVIEW_FRAME::ExportDataInPcbnewFormat( wxCommandEvent& event ) } wxString fileName; - wxString path = wxGetCwd();; + wxString path = wxGetCwd(); wxFileDialog filedlg( this, _( "Board file name:" ), path, fileName, PcbFileWildcard, diff --git a/include/class_title_block.h b/include/class_title_block.h index 785be8aab4..7259382a6d 100644 --- a/include/class_title_block.h +++ b/include/class_title_block.h @@ -64,7 +64,7 @@ public: const wxString& GetTitle() const { - return getTbText( titleIdx );; + return getTbText( titleIdx ); } /** diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index b078fea36e..5be371e985 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -271,7 +271,7 @@ struct APP_KICAD : public wxApp { wxLogError( wxT( "Unhandled exception class: %s what: %s" ), GetChars( FROM_UTF8( typeid(e).name() )), - GetChars( FROM_UTF8( e.what() ) ) );; + GetChars( FROM_UTF8( e.what() ) ) ); } catch( const IO_ERROR& ioe ) { diff --git a/pagelayout_editor/properties_frame.cpp b/pagelayout_editor/properties_frame.cpp index b626f9d19f..71ab5db337 100644 --- a/pagelayout_editor/properties_frame.cpp +++ b/pagelayout_editor/properties_frame.cpp @@ -198,7 +198,7 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( WORKSHEET_DATAITEM* aItem ) WORKSHEET_DATAITEM_TEXT* item = (WORKSHEET_DATAITEM_TEXT*) aItem; item->m_FullText = item->m_TextBase; // Replace our '\' 'n' sequence by the EOL char - item->ReplaceAntiSlashSequence();; + item->ReplaceAntiSlashSequence(); m_textCtrlText->SetValue( item->m_FullText ); msg.Printf( wxT("%d"), item->m_IncrementLabel ); diff --git a/pcb_calculator/attenuators.cpp b/pcb_calculator/attenuators.cpp index b2f27a2c58..eb17803c35 100644 --- a/pcb_calculator/attenuators.cpp +++ b/pcb_calculator/attenuators.cpp @@ -5,7 +5,7 @@ /* * This program source code file is part of KICAD, a free EDA CAD application. * - * Copyright (C) 12011 jean-pierre.charras + * Copyright (C) 2011 jean-pierre.charras * Copyright (C) 2011 Kicad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or @@ -83,10 +83,12 @@ void PCB_CALCULATOR_FRAME::TransfAttenuatorDataToPanel() m_AttValueCtrl->Enable( m_currAttenuator->m_Attenuation_Enable ); m_ZinValueCtrl->Enable( m_currAttenuator->m_Zin_Enable ); + if( m_currAttenuator->m_Zin_Enable ) msg.Printf( wxT( "%g" ), m_currAttenuator->m_Zin ); else - msg.Clear();; + msg.Clear(); + m_ZinValueCtrl->SetValue( msg ); msg.Printf( wxT( "%g" ), m_currAttenuator->m_Zout ); diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index ae189d2223..351f5cc845 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -373,7 +373,6 @@ endif() if( KICAD_USE_WEBKIT AND BUILD_GITHUB_PLUGIN ) set( WEBVIEWER_WXLIB "webviewer" ) - add_definitions( -DKICAD_USE_WEBKIT ) endif() diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 1250007d43..4abd48edcf 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -678,7 +678,7 @@ void D_PAD::GetOblongDrillGeometry( wxPoint& aStartPoint, // of an equivalent segment which have the same position and width as the hole int delta_cx, delta_cy; - wxSize halfsize = GetDrillSize();; + wxSize halfsize = GetDrillSize(); halfsize.x /= 2; halfsize.y /= 2; diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 7fc41f8dcd..c68596bd29 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -207,7 +207,7 @@ public: void TransformShapeWithClearanceToPolygon( CPOLYGONS_LIST& aCornerBuffer, int aClearanceValue, int aCircleToSegmentsCount, - double aCorrectionFactor ) const;; + double aCorrectionFactor ) const; /** * Function GetClearance diff --git a/pcbnew/dialogs/dialog_design_rules.cpp b/pcbnew/dialogs/dialog_design_rules.cpp index ab8ede609f..8d1d5dbf83 100644 --- a/pcbnew/dialogs/dialog_design_rules.cpp +++ b/pcbnew/dialogs/dialog_design_rules.cpp @@ -431,7 +431,7 @@ void DIALOG_DESIGN_RULES::InitializeRulesSelectionBoxes() m_leftClassChoice->Select( 0 ); m_buttonRightToLeft->Enable( false ); - m_buttonLeftToRight->Enable( false );; + m_buttonLeftToRight->Enable( false ); FillListBoxWithNetNames( m_leftListCtrl, m_leftClassChoice->GetStringSelection() ); FillListBoxWithNetNames( m_rightListCtrl, m_rightClassChoice->GetStringSelection() ); @@ -821,7 +821,7 @@ void DIALOG_DESIGN_RULES::OnRightCBSelection( wxCommandEvent& event ) if( m_leftClassChoice->GetStringSelection() == m_rightClassChoice->GetStringSelection() ) { m_buttonRightToLeft->Enable( false ); - m_buttonLeftToRight->Enable( false );; + m_buttonLeftToRight->Enable( false ); } else { diff --git a/pcbnew/dialogs/dialog_freeroute_exchange.cpp b/pcbnew/dialogs/dialog_freeroute_exchange.cpp index 8ca84c3513..51b8736490 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange.cpp +++ b/pcbnew/dialogs/dialog_freeroute_exchange.cpp @@ -188,7 +188,7 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) command = value + wxFileName::GetPathSeparator(); command << wxT("bin\\java"); #else // __WINDOWS__ - command = wxT( "java" );; + command = wxT( "java" ); #endif command << wxT(" -jar "); diff --git a/pcbnew/github/github_getliblist.cpp b/pcbnew/github/github_getliblist.cpp index c892287e43..3bec9479c6 100644 --- a/pcbnew/github/github_getliblist.cpp +++ b/pcbnew/github/github_getliblist.cpp @@ -101,7 +101,7 @@ bool GITHUB_GETLIBLIST::GetLibraryList( wxArrayString& aList ) // The URL lib names are relative to the server name. // so add the server name to them. wxURI repo( m_repoURL ); - wxString urlPrefix = wxT( "https://" ) + repo.GetServer() + wxT( "/" );; + wxString urlPrefix = wxT( "https://" ) + repo.GetServer() + wxT( "/" ); wxString errorMsg; const char sep = ','; // Separator fields, in json returned file diff --git a/pcbnew/ratsnest.cpp b/pcbnew/ratsnest.cpp index 77a14e45e4..f1eb0c7055 100644 --- a/pcbnew/ratsnest.cpp +++ b/pcbnew/ratsnest.cpp @@ -883,7 +883,7 @@ void PCB_BASE_FRAME::BuildAirWiresTargetsList( BOARD_CONNECTED_ITEM* aItemRef, if( track->GetNetCode() < net_code ) continue; if( track->GetNetCode() > net_code ) - break;; + break; if( !track->GetSubNet() || (track->GetSubNet() != subnet) ) {