Various Coverity fixes

This commit is contained in:
Ian McInerney 2020-10-27 00:25:08 +00:00
parent dc542be91d
commit 6bd3b0afa4
6 changed files with 14 additions and 8 deletions

View File

@ -44,6 +44,7 @@ void RAY::Init( const SFVEC3F& o, const SFVEC3F& d )
m_Dir = d; m_Dir = d;
m_InvDir = 1.0f / d; m_InvDir = 1.0f / d;
rayID = 0; // Not used, just set to 0
//rayID = gs_next_rayID; //rayID = gs_next_rayID;
//gs_next_rayID++; //gs_next_rayID++;

View File

@ -29,11 +29,13 @@
///! Update the schema version whenever a migration is required ///! Update the schema version whenever a migration is required
const int cvpcbSchemaVersion = 0; const int cvpcbSchemaVersion = 0;
CVPCB_SETTINGS::CVPCB_SETTINGS() CVPCB_SETTINGS::CVPCB_SETTINGS() :
: APP_SETTINGS_BASE( "cvpcb", cvpcbSchemaVersion ), APP_SETTINGS_BASE( "cvpcb", cvpcbSchemaVersion ),
m_FootprintViewerAutoZoom( false ), m_FootprintViewerAutoZoom( false ),
m_FootprintViewerZoom( 1.0 ), m_FootprintViewerZoom( 1.0 ),
m_FilterFootprint( 0 ) m_FilterFootprint( 0 ),
m_LibrariesWidth( 0 ),
m_FootprintsWidth( 0 )
{ {
// We always snap and don't let the user configure it // We always snap and don't let the user configure it
m_FootprintViewerMagneticSettings.pads = MAGNETIC_OPTIONS::CAPTURE_ALWAYS; m_FootprintViewerMagneticSettings.pads = MAGNETIC_OPTIONS::CAPTURE_ALWAYS;

View File

@ -62,6 +62,7 @@
SCH_CONNECTION::SCH_CONNECTION( SCH_ITEM* aParent, SCH_SHEET_PATH aPath ) : SCH_CONNECTION::SCH_CONNECTION( SCH_ITEM* aParent, SCH_SHEET_PATH aPath ) :
m_sheet( aPath ), m_sheet( aPath ),
m_parent( aParent ), m_parent( aParent ),
m_driver( nullptr ),
m_graph( nullptr ) m_graph( nullptr )
{ {
Reset(); Reset();
@ -71,6 +72,7 @@ SCH_CONNECTION::SCH_CONNECTION( SCH_ITEM* aParent, SCH_SHEET_PATH aPath ) :
SCH_CONNECTION::SCH_CONNECTION( CONNECTION_GRAPH* aGraph ) : SCH_CONNECTION::SCH_CONNECTION( CONNECTION_GRAPH* aGraph ) :
m_sheet( SCH_SHEET_PATH() ), m_sheet( SCH_SHEET_PATH() ),
m_parent( nullptr ), m_parent( nullptr ),
m_driver( nullptr ),
m_graph( aGraph ) m_graph( aGraph )
{ {
Reset(); Reset();

View File

@ -44,7 +44,7 @@
void CADSTAR_SCH_ARCHIVE_LOADER::Load( ::SCHEMATIC* aSchematic, ::SCH_SHEET* aRootSheet, void CADSTAR_SCH_ARCHIVE_LOADER::Load( ::SCHEMATIC* aSchematic, ::SCH_SHEET* aRootSheet,
SCH_PLUGIN::SCH_PLUGIN_RELEASER* aSchPlugin, wxFileName aLibraryFileName ) SCH_PLUGIN::SCH_PLUGIN_RELEASER* aSchPlugin, const wxFileName& aLibraryFileName )
{ {
Parse(); Parse();

View File

@ -70,7 +70,7 @@ public:
* @param aRootSheet Root sheet to add the design onto * @param aRootSheet Root sheet to add the design onto
*/ */
void Load( ::SCHEMATIC* aSchematic, ::SCH_SHEET* aRootSheet, void Load( ::SCHEMATIC* aSchematic, ::SCH_SHEET* aRootSheet,
SCH_PLUGIN::SCH_PLUGIN_RELEASER* aSchPlugin, wxFileName aLibraryFileName ); SCH_PLUGIN::SCH_PLUGIN_RELEASER* aSchPlugin, const wxFileName& aLibraryFileName );
private: private:

View File

@ -317,7 +317,8 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxSt
m_mainToolBar( nullptr ), m_mainToolBar( nullptr ),
m_canvas( nullptr ), m_canvas( nullptr ),
m_currentCamera( m_trackBallCamera ), m_currentCamera( m_trackBallCamera ),
m_trackBallCamera( RANGE_SCALE_3D ) m_trackBallCamera( RANGE_SCALE_3D ),
m_disable_ray_tracing( true )
{ {
} }