Commit 25b9a42e authored by Wayne Stambaugh's avatar Wayne Stambaugh

More Coverity scan error fix goodness.

parent 9131d89e
...@@ -41,6 +41,9 @@ VRML1_MODEL_PARSER::VRML1_MODEL_PARSER( S3D_MASTER* aMaster ) : ...@@ -41,6 +41,9 @@ VRML1_MODEL_PARSER::VRML1_MODEL_PARSER( S3D_MASTER* aMaster ) :
{ {
m_model = NULL; m_model = NULL;
m_file = NULL; m_file = NULL;
m_Materials = NULL;
m_normalPerVertex = true;
colorPerVertex = true;
} }
......
...@@ -253,15 +253,14 @@ int VRML2_MODEL_PARSER::read_Transform() ...@@ -253,15 +253,14 @@ int VRML2_MODEL_PARSER::read_Transform()
} }
/**
* Read the DEF for a Coordinate
*/
int VRML2_MODEL_PARSER::read_DEF_Coordinate() int VRML2_MODEL_PARSER::read_DEF_Coordinate()
{ {
char text[128]; char text[128];
// Get the name of the definition. // Get the name of the definition.
GetNextTag( m_file, text, sizeof(text) ); if( !GetNextTag( m_file, text, sizeof(text) ) )
return -1;
std::string coordinateName = text; std::string coordinateName = text;
while( GetNextTag( m_file, text, sizeof(text) ) ) while( GetNextTag( m_file, text, sizeof(text) ) )
...@@ -291,7 +290,8 @@ int VRML2_MODEL_PARSER::read_DEF() ...@@ -291,7 +290,8 @@ int VRML2_MODEL_PARSER::read_DEF()
{ {
char text[128]; char text[128];
GetNextTag( m_file, text, sizeof(text) ); if( !GetNextTag( m_file, text, sizeof(text) ) )
return -1;
while( GetNextTag( m_file, text, sizeof(text) ) ) while( GetNextTag( m_file, text, sizeof(text) ) )
{ {
...@@ -348,7 +348,9 @@ int VRML2_MODEL_PARSER::read_USE() ...@@ -348,7 +348,9 @@ int VRML2_MODEL_PARSER::read_USE()
char text[128]; char text[128];
// Get the name of the definition. // Get the name of the definition.
GetNextTag( m_file, text, sizeof(text) ); if( !GetNextTag( m_file, text, sizeof(text) ) )
return -1;
std::string coordinateName = text; std::string coordinateName = text;
// Look for it in our coordinate map. // Look for it in our coordinate map.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2013 Tuomas Vaherkoski <tuomasvaherkoski@gmail.com> * Copyright (C) 2013 Tuomas Vaherkoski <tuomasvaherkoski@gmail.com>
* Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
X3D_MODEL_PARSER::X3D_MODEL_PARSER( S3D_MASTER* aMaster ) : X3D_MODEL_PARSER::X3D_MODEL_PARSER( S3D_MASTER* aMaster ) :
S3D_MODEL_PARSER( aMaster ) S3D_MODEL_PARSER( aMaster )
{ {
m_model = NULL;
} }
...@@ -52,7 +53,7 @@ X3D_MODEL_PARSER::~X3D_MODEL_PARSER() ...@@ -52,7 +53,7 @@ X3D_MODEL_PARSER::~X3D_MODEL_PARSER()
} }
void X3D_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3Dunits ) void X3D_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlUnitsTo3DUnits )
{ {
wxXmlDocument doc; wxXmlDocument doc;
...@@ -69,7 +70,7 @@ void X3D_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3Du ...@@ -69,7 +70,7 @@ void X3D_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3Du
} }
float vrmlunits_to_3Dunits = aVrmlunits_to_3Dunits; float vrmlunits_to_3Dunits = aVrmlUnitsTo3DUnits;
glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits ); glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits );
glm::vec3 matScale( GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y, glm::vec3 matScale( GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y,
......
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2010-12 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2010-2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2012-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -701,7 +701,8 @@ const wxString FP_LIB_TABLE::GlobalPathEnvVariableName() ...@@ -701,7 +701,8 @@ const wxString FP_LIB_TABLE::GlobalPathEnvVariableName()
} }
bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) throw (IO_ERROR, PARSE_ERROR ) bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable )
throw (IO_ERROR, PARSE_ERROR, boost::interprocess::lock_exception )
{ {
bool tableExists = true; bool tableExists = true;
wxFileName fn = GetGlobalTableFileName(); wxFileName fn = GetGlobalTableFileName();
......
...@@ -806,7 +806,8 @@ PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName ) throw( IO_ERROR, bo ...@@ -806,7 +806,8 @@ PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName ) throw( IO_ERROR, bo
} }
PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator ) throw( IO_ERROR ) PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator )
throw( IO_ERROR, boost::bad_pointer )
{ {
#if 1 #if 1
// Don't reload the library if it is already loaded. // Don't reload the library if it is already loaded.
......
...@@ -134,8 +134,8 @@ public: ...@@ -134,8 +134,8 @@ public:
* @return PART_LIB* - the new PART_LIB, which remains owned by this PART_LIBS container. * @return PART_LIB* - the new PART_LIB, which remains owned by this PART_LIBS container.
* @throw IO_ERROR if there's any problem loading. * @throw IO_ERROR if there's any problem loading.
*/ */
PART_LIB* AddLibrary( const wxString& aFileName, PART_LIB* AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator )
PART_LIBS::iterator& aIterator ) throw( IO_ERROR ); throw( IO_ERROR, boost::bad_pointer );
/** /**
* Function RemoveLibrary * Function RemoveLibrary
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -66,6 +66,7 @@ DIALOG_ERC::DIALOG_ERC( SCH_EDIT_FRAME* parent ) : ...@@ -66,6 +66,7 @@ DIALOG_ERC::DIALOG_ERC( SCH_EDIT_FRAME* parent ) :
) )
{ {
m_parent = parent; m_parent = parent;
m_lastMarkerFound = NULL;
Init(); Init();
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
......
...@@ -71,7 +71,12 @@ private: ...@@ -71,7 +71,12 @@ private:
wxImageList* imageList; wxImageList* imageList;
public: public:
HIERARCHY_TREE() { } HIERARCHY_TREE()
{
m_Parent = NULL;
imageList = NULL;
}
HIERARCHY_TREE( HIERARCHY_NAVIG_DLG* parent ); HIERARCHY_TREE( HIERARCHY_NAVIG_DLG* parent );
DECLARE_DYNAMIC_CLASS( HIERARCHY_TREE ) DECLARE_DYNAMIC_CLASS( HIERARCHY_TREE )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -95,6 +95,9 @@ LIB_ARC::LIB_ARC( LIB_PART* aParent ) : LIB_ITEM( LIB_ARC_T, aParent ) ...@@ -95,6 +95,9 @@ LIB_ARC::LIB_ARC( LIB_PART* aParent ) : LIB_ITEM( LIB_ARC_T, aParent )
m_typeName = _( "Arc" ); m_typeName = _( "Arc" );
m_editState = 0; m_editState = 0;
m_lastEditState = 0; m_lastEditState = 0;
m_editCenterDistance = 0.0;
m_editSelectPoint = ARC_STATUS_START;
m_editDirection = 0;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -51,6 +51,7 @@ LIB_POLYLINE::LIB_POLYLINE( LIB_PART* aParent ) : ...@@ -51,6 +51,7 @@ LIB_POLYLINE::LIB_POLYLINE( LIB_PART* aParent ) :
m_Width = 0; m_Width = 0;
m_isFillable = true; m_isFillable = true;
m_typeName = _( "PolyLine" ); m_typeName = _( "PolyLine" );
m_ModifyIndex = 0;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 20011 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2011-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -255,6 +255,7 @@ public: ...@@ -255,6 +255,7 @@ public:
SetScanTypes( aScanTypes ); SetScanTypes( aScanTypes );
m_foundIndex = 0; m_foundIndex = 0;
m_forceSearch = false; m_forceSearch = false;
m_sheetPath = NULL;
} }
void Empty() void Empty()
......
...@@ -182,6 +182,7 @@ SCH_COMPONENT::SCH_COMPONENT( LIB_PART& aPart, SCH_SHEET_PATH* sheet, int unit, ...@@ -182,6 +182,7 @@ SCH_COMPONENT::SCH_COMPONENT( LIB_PART& aPart, SCH_SHEET_PATH* sheet, int unit,
SCH_COMPONENT::SCH_COMPONENT( const SCH_COMPONENT& aComponent ) : SCH_COMPONENT::SCH_COMPONENT( const SCH_COMPONENT& aComponent ) :
SCH_ITEM( aComponent ) SCH_ITEM( aComponent )
{ {
m_currentSheetPath = NULL;
m_Parent = aComponent.m_Parent; m_Parent = aComponent.m_Parent;
m_Pos = aComponent.m_Pos; m_Pos = aComponent.m_Pos;
m_unit = aComponent.m_unit; m_unit = aComponent.m_unit;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -94,6 +94,8 @@ SCH_SCREEN::SCH_SCREEN( KIWAY* aKiway ) : ...@@ -94,6 +94,8 @@ SCH_SCREEN::SCH_SCREEN( KIWAY* aKiway ) :
KIWAY_HOLDER( aKiway ), KIWAY_HOLDER( aKiway ),
m_paper( wxT( "A4" ) ) m_paper( wxT( "A4" ) )
{ {
m_modification_sync = 0;
SetZoom( 32 ); SetZoom( 32 );
for( unsigned i = 0; i < DIM( SchematicZoomList ); i++ ) for( unsigned i = 0; i < DIM( SchematicZoomList ); i++ )
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2013 Jean-Pierre Charras, jpierre.charras at wanadoo * Copyright (C) 2013 Jean-Pierre Charras, jpierre.charras at wanadoo
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2013-2015 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer,
bool aPrintMirrorMode, void* aData ) bool aPrintMirrorMode, void* aData )
{ {
wxCHECK_RET( aData != NULL, wxT( "aDate cannot be NULL." ) );
// Save current draw options, because print mode has specific options: // Save current draw options, because print mode has specific options:
GBR_DISPLAY_OPTIONS imgDisplayOptions = m_DisplayOptions; GBR_DISPLAY_OPTIONS imgDisplayOptions = m_DisplayOptions;
std::bitset <GERBER_DRAWLAYERS_COUNT> printLayersMask = GetGerberLayout()->GetPrintableLayers(); std::bitset <GERBER_DRAWLAYERS_COUNT> printLayersMask = GetGerberLayout()->GetPrintableLayers();
...@@ -63,7 +65,7 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, ...@@ -63,7 +65,7 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer,
printCurrLayerMask.set(printParameters->m_Flags); // m_Flags contains the draw layer number printCurrLayerMask.set(printParameters->m_Flags); // m_Flags contains the draw layer number
GetGerberLayout()->SetPrintableLayers( printCurrLayerMask ); GetGerberLayout()->SetPrintableLayers( printCurrLayerMask );
m_canvas->SetPrintMirrored( aPrintMirrorMode ); m_canvas->SetPrintMirrored( aPrintMirrorMode );
bool printBlackAndWhite = printParameters && printParameters->m_Print_Black_and_White; bool printBlackAndWhite = printParameters->m_Print_Black_and_White;
GetGerberLayout()->Draw( m_canvas, aDC, UNSPECIFIED_DRAWMODE, GetGerberLayout()->Draw( m_canvas, aDC, UNSPECIFIED_DRAWMODE,
wxPoint( 0, 0 ), printBlackAndWhite ); wxPoint( 0, 0 ), printBlackAndWhite );
......
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2010-12 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2010-2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2012-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -538,7 +538,8 @@ public: ...@@ -538,7 +538,8 @@ public:
* @throw IO_ERROR if an error occurs attempting to load the footprint library * @throw IO_ERROR if an error occurs attempting to load the footprint library
* table. * table.
*/ */
static bool LoadGlobalTable( FP_LIB_TABLE& aTable ) throw (IO_ERROR, PARSE_ERROR ); static bool LoadGlobalTable( FP_LIB_TABLE& aTable )
throw (IO_ERROR, PARSE_ERROR, boost::interprocess::lock_exception );
/** /**
* Function GetGlobalTableFileName * Function GetGlobalTableFileName
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2011-2012 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2011-2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -69,11 +69,19 @@ public: ...@@ -69,11 +69,19 @@ public:
m_Color( aColor ), m_Color( aColor ),
m_Pad( aPad ) m_Pad( aPad )
{ {
m_X = 0;
m_UpperY = 0;
m_LowerY = 0;
} }
MSG_PANEL_ITEM() : MSG_PANEL_ITEM() :
m_Pad( MSG_PANEL_DEFAULT_PAD ) m_Pad( MSG_PANEL_DEFAULT_PAD )
{ {
m_X = 0;
m_UpperY = 0;
m_LowerY = 0;
m_Color = UNSPECIFIED_COLOR;
} }
void SetUpperText( const wxString& aUpperText ) { m_UpperText = aUpperText; } void SetUpperText( const wxString& aUpperText ) { m_UpperText = aUpperText; }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 CERN (www.cern.ch) * Copyright (C) 2013 CERN (www.cern.ch)
* Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -117,6 +117,9 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, ...@@ -117,6 +117,9 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode,
return; return;
PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent(); PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent();
wxCHECK_RET( frame != NULL, wxT( "Panel has no parent frame window." ) );
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)frame->GetDisplayOptions(); DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)frame->GetDisplayOptions();
PCB_SCREEN* screen = frame->GetScreen(); PCB_SCREEN* screen = frame->GetScreen();
...@@ -126,6 +129,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, ...@@ -126,6 +129,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode,
drawInfo.m_ShowPadFilled = true; drawInfo.m_ShowPadFilled = true;
EDA_COLOR_T color = BLACK; EDA_COLOR_T color = BLACK;
if( m_layerMask[F_Cu] ) if( m_layerMask[F_Cu] )
{ {
color = brd->GetVisibleElementColor( PAD_FR_VISIBLE ); color = brd->GetVisibleElementColor( PAD_FR_VISIBLE );
...@@ -169,7 +173,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, ...@@ -169,7 +173,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode,
displ_opts && displ_opts->m_ContrastModeDisplay ) displ_opts && displ_opts->m_ContrastModeDisplay )
{ {
// when routing tracks // when routing tracks
if( frame && frame->GetToolId() == ID_TRACK_BUTT ) if( frame->GetToolId() == ID_TRACK_BUTT )
{ {
LAYER_ID routeTop = screen->m_Route_Layer_TOP; LAYER_ID routeTop = screen->m_Route_Layer_TOP;
LAYER_ID routeBot = screen->m_Route_Layer_BOTTOM; LAYER_ID routeBot = screen->m_Route_Layer_BOTTOM;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2012-2014 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2012-2014 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -56,6 +56,7 @@ public: ...@@ -56,6 +56,7 @@ public:
LAYER_BOX_SELECTOR( parent, id, pos, size, n, choices ) LAYER_BOX_SELECTOR( parent, id, pos, size, n, choices )
{ {
m_boardFrame = NULL; m_boardFrame = NULL;
m_hotkeys = NULL;
} }
// Accessors // Accessors
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -119,19 +119,9 @@ void TEXTE_PCB::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) ...@@ -119,19 +119,9 @@ void TEXTE_PCB::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
{ {
wxString msg; wxString msg;
#if defined(__WXDEBUG__) wxCHECK_RET( m_Parent != NULL, wxT( "TEXTE_PCB::GetMsgPanelInfo() m_Parent is NULL." ) );
BOARD_ITEM* parent = (BOARD_ITEM*) m_Parent;
wxASSERT( parent );
BOARD* board; if( m_Parent->Type() == PCB_DIMENSION_T )
if( parent->Type() == PCB_DIMENSION_T )
board = (BOARD*) parent->GetParent();
else
board = (BOARD*) parent;
wxASSERT( board );
#endif
if( m_Parent && m_Parent->Type() == PCB_DIMENSION_T )
aList.push_back( MSG_PANEL_ITEM( _( "Dimension" ), GetShownText(), DARKGREEN ) ); aList.push_back( MSG_PANEL_ITEM( _( "Dimension" ), GetShownText(), DARKGREEN ) );
else else
aList.push_back( MSG_PANEL_ITEM( _( "PCB Text" ), GetShownText(), DARKGREEN ) ); aList.push_back( MSG_PANEL_ITEM( _( "PCB Text" ), GetShownText(), DARKGREEN ) );
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -762,9 +762,10 @@ unsigned int TRACK::ViewGetLOD( int aLayer ) const ...@@ -762,9 +762,10 @@ unsigned int TRACK::ViewGetLOD( int aLayer ) const
} }
void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aOffset )
const wxPoint& aOffset )
{ {
wxCHECK_RET( panel != NULL, wxT( "VIA::Draw panel cannot be NULL." ) );
int radius; int radius;
LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
...@@ -967,10 +968,11 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, ...@@ -967,10 +968,11 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
if( aDC->LogicalToDeviceXRel( tsize ) >= MIN_TEXT_SIZE ) if( aDC->LogicalToDeviceXRel( tsize ) >= MIN_TEXT_SIZE )
{ {
tsize = (tsize * 7) / 10; // small reduction to give a better look, inside via tsize = (tsize * 7) / 10; // small reduction to give a better look, inside via
if( (aDrawMode & GR_XOR) == 0 ) if( (aDrawMode & GR_XOR) == 0 )
GRSetDrawMode( aDC, GR_COPY ); GRSetDrawMode( aDC, GR_COPY );
EDA_RECT* clipbox = panel? panel->GetClipBox() : NULL; EDA_RECT* clipbox = panel->GetClipBox();
DrawGraphicHaloText( clipbox, aDC, m_Start, DrawGraphicHaloText( clipbox, aDC, m_Start,
color, WHITE, BLACK, net->GetShortNetname(), 0, color, WHITE, BLACK, net->GetShortNetname(), 0,
wxSize( tsize, tsize ), wxSize( tsize, tsize ),
......
...@@ -81,7 +81,7 @@ void KICAD_NETLIST_PARSER::skipCurrent() throw( IO_ERROR, PARSE_ERROR ) ...@@ -81,7 +81,7 @@ void KICAD_NETLIST_PARSER::skipCurrent() throw( IO_ERROR, PARSE_ERROR )
} }
void KICAD_NETLIST_PARSER::Parse() throw( IO_ERROR, PARSE_ERROR ) void KICAD_NETLIST_PARSER::Parse() throw( IO_ERROR, PARSE_ERROR, boost::bad_pointer )
{ {
wxString text; wxString text;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Copyright (C) 2007-2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2007-2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2004 Jean-Pierre Charras, jp.charras@wanadoo.fr * Copyright (C) 2004 Jean-Pierre Charras, jp.charras@wanadoo.fr
* Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 1992-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -3051,6 +3051,7 @@ double LEGACY_PLUGIN::degParse( const char* aValue, const char** nptrptr ) ...@@ -3051,6 +3051,7 @@ double LEGACY_PLUGIN::degParse( const char* aValue, const char** nptrptr )
void LEGACY_PLUGIN::init( const PROPERTIES* aProperties ) void LEGACY_PLUGIN::init( const PROPERTIES* aProperties )
{ {
m_loading_format_version = 0;
m_cu_count = 16; m_cu_count = 16;
m_board = NULL; m_board = NULL;
m_props = aProperties; m_props = aProperties;
......
...@@ -359,7 +359,7 @@ public: ...@@ -359,7 +359,7 @@ public:
* Function Parse * Function Parse
* parse the full netlist * parse the full netlist
*/ */
void Parse() throw( IO_ERROR, PARSE_ERROR ); void Parse() throw( IO_ERROR, PARSE_ERROR, boost::bad_pointer );
// Useful for debug only: // Useful for debug only:
const char* getTokenName( NL_T::T aTok ) const char* getTokenName( NL_T::T aTok )
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2007-2011 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2007-2011 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2007-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -622,7 +622,7 @@ void SPECCTRA_DB::doLAYER_NOISE_WEIGHT( LAYER_NOISE_WEIGHT* growth ) ...@@ -622,7 +622,7 @@ void SPECCTRA_DB::doLAYER_NOISE_WEIGHT( LAYER_NOISE_WEIGHT* growth )
} }
void SPECCTRA_DB::doSTRUCTURE( STRUCTURE* growth ) throw( IO_ERROR ) void SPECCTRA_DB::doSTRUCTURE( STRUCTURE* growth ) throw( IO_ERROR, boost::bad_pointer )
{ {
T tok; T tok;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2007-2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * Copyright (C) 2007-2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2007-2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -3694,7 +3694,7 @@ class SPECCTRA_DB : public SPECCTRA_LEXER ...@@ -3694,7 +3694,7 @@ class SPECCTRA_DB : public SPECCTRA_LEXER
void doPARSER( PARSER* growth ) throw( IO_ERROR ); void doPARSER( PARSER* growth ) throw( IO_ERROR );
void doRESOLUTION( UNIT_RES* growth ) throw( IO_ERROR ); void doRESOLUTION( UNIT_RES* growth ) throw( IO_ERROR );
void doUNIT( UNIT_RES* growth ) throw( IO_ERROR ); void doUNIT( UNIT_RES* growth ) throw( IO_ERROR );
void doSTRUCTURE( STRUCTURE* growth ) throw( IO_ERROR ); void doSTRUCTURE( STRUCTURE* growth ) throw( IO_ERROR, boost::bad_pointer );
void doSTRUCTURE_OUT( STRUCTURE_OUT* growth ) throw( IO_ERROR, boost::bad_pointer ); void doSTRUCTURE_OUT( STRUCTURE_OUT* growth ) throw( IO_ERROR, boost::bad_pointer );
void doLAYER_NOISE_WEIGHT( LAYER_NOISE_WEIGHT* growth ) throw( IO_ERROR, boost::bad_pointer ); void doLAYER_NOISE_WEIGHT( LAYER_NOISE_WEIGHT* growth ) throw( IO_ERROR, boost::bad_pointer );
void doLAYER_PAIR( LAYER_PAIR* growth ) throw( IO_ERROR ); void doLAYER_PAIR( LAYER_PAIR* growth ) throw( IO_ERROR );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment