Commit 9004ed88 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Remove a few coverity warnings. Fix some comments which were incorrect, due to...

Remove a few coverity warnings. Fix some comments which were incorrect, due to the changes in code. Remove not compiled code (kept as comments), now outdated or useless
legacy plugin: better compatibility with old brd files (current track width and current vias size, stored in SETUP section, were not read from file and incorrectly set)
parent 2427b402
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -38,6 +38,9 @@ using namespace KIGFX;
OPENGL_COMPOSITOR::OPENGL_COMPOSITOR() :
    m_initialized( false ), m_current( 0 ), m_currentFbo( DIRECT_RENDERING )
{
    // Avoid not initialized members:
    m_framebuffer = 0;
    m_depthBuffer = 0;
}


+3 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )

    case SCH_BUS_BUS_ENTRY_T:
    case SCH_BUS_WIRE_ENTRY_T:
        AddMenusForBusEntry( PopMenu, dynamic_cast<SCH_BUS_ENTRY_BASE*>( item ) );
        AddMenusForBusEntry( PopMenu, static_cast<SCH_BUS_ENTRY_BASE*>( item ) );
        break;

    case SCH_MARKER_T:
@@ -854,6 +854,7 @@ void AddMenusForMarkers( wxMenu* aPopMenu, SCH_MARKER* aMarker, SCH_EDIT_FRAME*
void AddMenusForBitmap( wxMenu* aPopMenu, SCH_BITMAP * aBitmap )
{
    wxString msg;

    if( aBitmap->GetFlags() == 0 )
    {
        msg = AddHotkeyName( _( "Move Image" ), g_Schematic_Hokeys_Descr,
@@ -884,6 +885,7 @@ void AddMenusForBitmap( wxMenu* aPopMenu, SCH_BITMAP * aBitmap )
void AddMenusForBusEntry( wxMenu* aPopMenu, SCH_BUS_ENTRY_BASE* aBusEntry )
{
    wxString msg;

    if( !aBusEntry->GetFlags() )
    {
        msg = AddHotkeyName( _( "Move Bus Entry" ), g_Schematic_Hokeys_Descr,
+6 −0
Original line number Diff line number Diff line
@@ -47,6 +47,12 @@
#define DEFAULT_SOLDERMASK_CLEARANCE 0.2
#define DEFAULT_SOLDERMASK_MIN_WIDTH Millimeter2iu( 0.0 )

#define DEFAULT_CUSTOMTRACKWIDTH    0.2
#define DEFAULT_TRACKMINWIDTH       0.2     // track width min value
#define DEFAULT_VIASMINSIZE         0.4     // vias (not micro vias) min diameter
#define DEFAULT_VIASMINDRILL        0.3     // vias (not micro vias) min drill diameter
#define DEFAULT_MICROVIASMINSIZE    0.2     // micro vias (not vias) min diameter
#define DEFAULT_MICROVIASMINDRILL   0.1     // micro vias (not vias) min drill diameter

/**
 * Struct VIA_DIMENSION
+1 −1
Original line number Diff line number Diff line
@@ -331,7 +331,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx
                                     bool aErase )
{
    BASE_SCREEN*            screen = aPanel->GetScreen();
    FOOTPRINT_EDIT_FRAME*   moduleEditFrame = dynamic_cast<FOOTPRINT_EDIT_FRAME*>( aPanel->GetParent() );
    FOOTPRINT_EDIT_FRAME*   moduleEditFrame = static_cast<FOOTPRINT_EDIT_FRAME*>( aPanel->GetParent() );

    wxASSERT( moduleEditFrame );
    MODULE* currentModule = moduleEditFrame->GetBoard()->m_Modules;
+1 −3
Original line number Diff line number Diff line
@@ -94,11 +94,9 @@ BOARD::BOARD() :
            m_Layer[layer].m_type = LT_UNDEFINED;
    }

    // Initialize default netclass.
    NETCLASSPTR defaultClass = m_designSettings.GetDefault();
    defaultClass->SetDescription( _( "This is the default net class." ) );

    // Initialize default values in default netclass.
    defaultClass->SetParams( m_designSettings );
    m_designSettings.SetCurrentNetClass( defaultClass->GetName() );

    // Set sensible initial values for custom track width & via size
Loading