Add/fix some variable initializations

This commit is contained in:
Ian McInerney 2022-09-24 23:37:44 +01:00
parent a7242f423c
commit 1683e552f7
10 changed files with 20 additions and 7 deletions

View File

@ -91,6 +91,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
m_auxiliaryToolBar = nullptr; m_auxiliaryToolBar = nullptr;
m_gridSelectBox = nullptr; m_gridSelectBox = nullptr;
m_zoomSelectBox = nullptr; m_zoomSelectBox = nullptr;
m_searchPane = nullptr;
m_firstRunDialogSetting = 0; m_firstRunDialogSetting = 0;
m_undoRedoCountMax = DEFAULT_MAX_UNDO_ITEMS; m_undoRedoCountMax = DEFAULT_MAX_UNDO_ITEMS;

View File

@ -58,7 +58,9 @@ wxString OUTLINE_FONT::FreeTypeVersion()
if( !m_freeType ) if( !m_freeType )
FT_Init_FreeType( &m_freeType ); FT_Init_FreeType( &m_freeType );
FT_Int major, minor, patch; FT_Int major = 0;
FT_Int minor = 0;
FT_Int patch = 0;
FT_Library_Version( m_freeType, &major, &minor, &patch ); FT_Library_Version( m_freeType, &major, &minor, &patch );
return wxString::Format( "%d.%d.%d", major, minor, patch ); return wxString::Format( "%d.%d.%d", major, minor, patch );

View File

@ -1323,6 +1323,7 @@ CAIRO_GAL::CAIRO_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
m_tempBuffer = 0; m_tempBuffer = 0;
m_savedBuffer = 0; m_savedBuffer = 0;
m_validCompositor = false; m_validCompositor = false;
m_currentTarget = TARGET_NONCACHED;
SetTarget( TARGET_NONCACHED ); SetTarget( TARGET_NONCACHED );
m_bitmapBuffer = nullptr; m_bitmapBuffer = nullptr;

View File

@ -302,4 +302,4 @@ void PARAM_VIEWPORT3D::jsonToViewports( const nlohmann::json& aJson )
m_viewports->emplace_back( v ); m_viewports->emplace_back( v );
} }
} }
} }

View File

@ -40,6 +40,7 @@ PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS( PROJECT* aProject, const wxStrin
m_ViaOpacity( 1.0 ), m_ViaOpacity( 1.0 ),
m_PadOpacity( 1.0 ), m_PadOpacity( 1.0 ),
m_ZoneOpacity( 0.6 ), m_ZoneOpacity( 0.6 ),
m_ImageOpacity( 0.6 ),
m_SelectionFilter(), m_SelectionFilter(),
m_project( aProject ) m_project( aProject )
{ {

View File

@ -106,7 +106,7 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
#endif #endif
m_params.emplace_back( new PARAM<bool>( "appearance.show_scrollbars", m_params.emplace_back( new PARAM<bool>( "appearance.show_scrollbars",
&m_Appearance.show_scrollbars, 1 ) ); &m_Appearance.show_scrollbars, true ) );
m_params.emplace_back( new PARAM<double>( "appearance.hicontrast_dimming_factor", m_params.emplace_back( new PARAM<double>( "appearance.hicontrast_dimming_factor",
&m_Appearance.hicontrast_dimming_factor, 0.8f ) ); &m_Appearance.hicontrast_dimming_factor, 0.8f ) );

View File

@ -133,6 +133,10 @@ DIALOG_FIELD_PROPERTIES::DIALOG_FIELD_PROPERTIES( SCH_BASE_FRAME* aParent, const
m_verticalJustification = aTextItem->GetVertJustify(); m_verticalJustification = aTextItem->GetVertJustify();
m_horizontalJustification = aTextItem->GetHorizJustify(); m_horizontalJustification = aTextItem->GetHorizJustify();
m_isVisible = aTextItem->IsVisible(); m_isVisible = aTextItem->IsVisible();
// These should be initialized in the child classes implementing dialogs for lib and sch items.
m_isNameVisible = false;
m_allowAutoplace = true;
} }

View File

@ -48,7 +48,8 @@ class NGSPICE_CIRCUIT_MODEL : public NETLIST_EXPORTER_SPICE, public SIMULATION_M
{ {
public: public:
NGSPICE_CIRCUIT_MODEL( SCHEMATIC_IFACE* aSchematic ) : NGSPICE_CIRCUIT_MODEL( SCHEMATIC_IFACE* aSchematic ) :
NETLIST_EXPORTER_SPICE( aSchematic ) NETLIST_EXPORTER_SPICE( aSchematic ),
m_options( 0 )
{ {
} }
virtual ~NGSPICE_CIRCUIT_MODEL() {} virtual ~NGSPICE_CIRCUIT_MODEL() {}

View File

@ -53,7 +53,8 @@ PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
m_undoRedoBlocked( false ), m_undoRedoBlocked( false ),
m_selectionFilterPanel( nullptr ), m_selectionFilterPanel( nullptr ),
m_appearancePanel( nullptr ), m_appearancePanel( nullptr ),
m_propertiesPanel( nullptr ) m_propertiesPanel( nullptr ),
m_tabbedPanel( nullptr )
{ {
Bind( wxEVT_IDLE, Bind( wxEVT_IDLE,
[this]( wxIdleEvent& aEvent ) [this]( wxIdleEvent& aEvent )

View File

@ -175,7 +175,8 @@ static const TOOL_ACTION ACT_SwitchCornerMode( "pcbnew.InteractiveRouter.SwitchR
ROUTER_TOOL::ROUTER_TOOL() : ROUTER_TOOL::ROUTER_TOOL() :
TOOL_BASE( "pcbnew.InteractiveRouter" ), TOOL_BASE( "pcbnew.InteractiveRouter" ),
m_lastTargetLayer( UNDEFINED_LAYER ) m_lastTargetLayer( UNDEFINED_LAYER ),
m_originalActiveLayer( UNDEFINED_LAYER )
{ {
} }
@ -433,7 +434,8 @@ ROUTER_TOOL::~ROUTER_TOOL()
bool ROUTER_TOOL::Init() bool ROUTER_TOOL::Init()
{ {
m_lastTargetLayer = UNDEFINED_LAYER; m_lastTargetLayer = UNDEFINED_LAYER;
m_originalActiveLayer = UNDEFINED_LAYER;
PCB_EDIT_FRAME* frame = getEditFrame<PCB_EDIT_FRAME>(); PCB_EDIT_FRAME* frame = getEditFrame<PCB_EDIT_FRAME>();