Fix 3D Coverity issue, other minor fixes
* CID 143740: Null pointer dereferences (NULL_RETURNS) A few minor cut/paste and style issues in the 3D code are also fixed.
This commit is contained in:
parent
5e41763d83
commit
973786d75d
|
@ -123,9 +123,7 @@ PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, S3D_CACHE* aCacheManager ) :
|
||||||
zoff = NULL;
|
zoff = NULL;
|
||||||
|
|
||||||
wxBoxSizer* mainBox = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer* mainBox = new wxBoxSizer( wxVERTICAL );
|
||||||
|
wxStaticBoxSizer* vbox = new wxStaticBoxSizer( wxVERTICAL, this, _( "3D Preview" ) );
|
||||||
wxStaticBoxSizer* vbox = new wxStaticBoxSizer( wxVERTICAL, this, _( "3D Model Orientation" ) );
|
|
||||||
|
|
||||||
m_FileTree = NULL;
|
m_FileTree = NULL;
|
||||||
|
|
||||||
if( NULL != aParent )
|
if( NULL != aParent )
|
||||||
|
|
|
@ -56,7 +56,8 @@ const int COGL_ATT_LIST::m_openGL_AttributesList[] = {
|
||||||
|
|
||||||
|
|
||||||
int COGL_ATT_LIST::m_openGL_AttributesList_toUse[
|
int COGL_ATT_LIST::m_openGL_AttributesList_toUse[
|
||||||
sizeof( COGL_ATT_LIST::m_openGL_AttributesList )] = { 0 };
|
sizeof( COGL_ATT_LIST::m_openGL_AttributesList ) /
|
||||||
|
sizeof( COGL_ATT_LIST::m_openGL_AttributesList[0] ) ] = { 0 };
|
||||||
|
|
||||||
|
|
||||||
const int *COGL_ATT_LIST::GetAttributesList( bool aUseAntiAliasing )
|
const int *COGL_ATT_LIST::GetAttributesList( bool aUseAntiAliasing )
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
#define REVISION 0
|
#define REVISION 0
|
||||||
#define PATCH 0
|
#define PATCH 0
|
||||||
|
|
||||||
#include "../kicad_plugin.h"
|
#include "plugins/kicad_plugin.h"
|
||||||
|
|
||||||
|
|
||||||
KICAD_PLUGIN_EXPORT char const* GetKicadPluginClass( void )
|
KICAD_PLUGIN_EXPORT char const* GetKicadPluginClass( void )
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class IFSG_INDEX
|
* Class IFSG_COLORS
|
||||||
* is the wrapper for SGCOLORS
|
* is the wrapper for SGCOLORS
|
||||||
*/
|
*/
|
||||||
class SGLIB_API IFSG_COLORS : public IFSG_NODE
|
class SGLIB_API IFSG_COLORS : public IFSG_NODE
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class IFSG_INDEX
|
* Class IFSG_COORDS
|
||||||
* is the wrapper for SGCOORDS
|
* is the wrapper for SGCOORDS
|
||||||
*/
|
*/
|
||||||
class SGLIB_API IFSG_COORDS : public IFSG_NODE
|
class SGLIB_API IFSG_COORDS : public IFSG_NODE
|
||||||
|
|
|
@ -53,14 +53,6 @@ class SGNODE;
|
||||||
*/
|
*/
|
||||||
class SGLIB_API IFSG_NODE
|
class SGLIB_API IFSG_NODE
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
// hide the copy constructors and assignment operator to avoid accidental misuse
|
|
||||||
IFSG_NODE( const IFSG_NODE& aParent );
|
|
||||||
IFSG_NODE( IFSG_NODE& aParent );
|
|
||||||
IFSG_NODE( volatile const IFSG_NODE& aParent );
|
|
||||||
IFSG_NODE( volatile IFSG_NODE& aParent );
|
|
||||||
IFSG_NODE& operator= ( const IFSG_NODE& );
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SGNODE* m_node;
|
SGNODE* m_node;
|
||||||
|
|
||||||
|
@ -68,6 +60,13 @@ public:
|
||||||
IFSG_NODE();
|
IFSG_NODE();
|
||||||
virtual ~IFSG_NODE();
|
virtual ~IFSG_NODE();
|
||||||
|
|
||||||
|
// deleted operators
|
||||||
|
IFSG_NODE( const IFSG_NODE& aParent ) = delete;
|
||||||
|
IFSG_NODE( IFSG_NODE& aParent ) = delete;
|
||||||
|
IFSG_NODE( volatile const IFSG_NODE& aParent ) = delete;
|
||||||
|
IFSG_NODE( volatile IFSG_NODE& aParent ) = delete;
|
||||||
|
IFSG_NODE& operator= ( const IFSG_NODE& ) = delete;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function Destroy
|
* Function Destroy
|
||||||
* deletes the object held by this wrapper
|
* deletes the object held by this wrapper
|
||||||
|
|
Loading…
Reference in New Issue