Initialize variables properly

This commit is contained in:
Ian McInerney 2020-09-16 11:27:46 +01:00
parent aa0b0ca7e7
commit a53f3899d4
5 changed files with 13 additions and 6 deletions

View File

@ -41,6 +41,7 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
m_Env(), m_Env(),
m_Input(), m_Input(),
m_Graphics(), m_Graphics(),
m_Session(),
m_System() m_System()
{ {
// This only effect the first time KiCad is run. The user's setting will be used for all // This only effect the first time KiCad is run. The user's setting will be used for all

View File

@ -41,11 +41,13 @@ PAGED_DIALOG::PAGED_DIALOG( wxWindow* aParent, const wxString& aTitle, bool aUse
DIALOG_SHIM( aParent, wxID_ANY, aTitle, wxDefaultPosition, wxDefaultSize, DIALOG_SHIM( aParent, wxID_ANY, aTitle, wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ),
m_title( aTitle ), m_title( aTitle ),
m_dirty( false ),
m_errorCtrl( nullptr ), m_errorCtrl( nullptr ),
m_errorRow( 0 ), m_errorRow( 0 ),
m_errorCol( 0 ), m_errorCol( 0 ),
m_auxiliaryButton( nullptr ), m_auxiliaryButton( nullptr ),
m_resetButton( nullptr ) m_resetButton( nullptr ),
m_cancelButton( nullptr )
{ {
auto mainSizer = new wxBoxSizer( wxVERTICAL ); auto mainSizer = new wxBoxSizer( wxVERTICAL );
SetSizer( mainSizer ); SetSizer( mainSizer );

View File

@ -65,7 +65,9 @@ LIB_TABLE_ROW* new_clone( const LIB_TABLE_ROW& aRow );
class LIB_TABLE_ROW : boost::noncopyable class LIB_TABLE_ROW : boost::noncopyable
{ {
public: public:
LIB_TABLE_ROW() LIB_TABLE_ROW() :
enabled( true ),
m_loaded( false )
{ {
} }
@ -221,7 +223,7 @@ private:
wxString description; wxString description;
bool enabled = true; ///< Whether the LIB_TABLE_ROW is enabled bool enabled = true; ///< Whether the LIB_TABLE_ROW is enabled
bool m_loaded; ///< Whether the LIB_TABLE_ROW is loaded bool m_loaded = false; ///< Whether the LIB_TABLE_ROW is loaded
std::unique_ptr< PROPERTIES > properties; std::unique_ptr< PROPERTIES > properties;
}; };

View File

@ -44,7 +44,8 @@
class DRC_TEST_PROVIDER_MISC : public DRC_TEST_PROVIDER class DRC_TEST_PROVIDER_MISC : public DRC_TEST_PROVIDER
{ {
public: public:
DRC_TEST_PROVIDER_MISC() DRC_TEST_PROVIDER_MISC() :
m_board( nullptr )
{ {
m_isRuleDriven = false; m_isRuleDriven = false;
} }

View File

@ -306,7 +306,8 @@ POINT_EDITOR::POINT_EDITOR() :
m_editedPoint( NULL ), m_editedPoint( NULL ),
m_original( VECTOR2I( 0, 0 ) ), m_original( VECTOR2I( 0, 0 ) ),
m_altConstrainer( VECTOR2I( 0, 0 ) ), m_altConstrainer( VECTOR2I( 0, 0 ) ),
m_refill( false ) m_refill( false ),
m_altEditMethod( false )
{ {
} }