7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-02 00:26:45 +00:00

Formatting.

This commit is contained in:
Jeff Young 2024-12-07 18:23:01 +00:00
parent 78f01b829d
commit 0bcf6000a4
7 changed files with 13 additions and 20 deletions

View File

@ -37,7 +37,7 @@ static struct IFACE : public KIFACE_BASE
bool OnKifaceStart( PGM_BASE* aProgram, int aCtlBits, KIWAY* aKiway ) override;
wxWindow* CreateKiWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway,
int aCtlBits = 0 ) override
int aCtlBits = 0 ) override
{
InitSettings( new BITMAP2CMP_SETTINGS );
Pgm().GetSettingsManager().RegisterSettings( KifaceSettings() );

View File

@ -77,9 +77,7 @@ int COMMON_CONTROL::ConfigurePaths( const TOOL_EVENT& aEvent )
{
// If _pcbnew.kiface is running have it put up the dialog so the 3D paths can also
// be edited
KIFACE* pcbnew = m_frame->Kiway().KiFACE( KIWAY::FACE_PCB, false );
if( pcbnew )
if( KIFACE* pcbnew = m_frame->Kiway().KiFACE( KIWAY::FACE_PCB, false ) )
{
try
{
@ -109,9 +107,7 @@ int COMMON_CONTROL::ShowLibraryTable( const TOOL_EVENT& aEvent )
{
try // Sch frame was not available, try to start it
{
KIFACE* kiface = m_frame->Kiway().KiFACE( KIWAY::FACE_SCH );
if( kiface )
if( KIFACE* kiface = m_frame->Kiway().KiFACE( KIWAY::FACE_SCH ) )
kiface->CreateKiWindow( m_frame, DIALOG_SCH_LIBRARY_TABLE, &m_frame->Kiway() );
}
catch( ... )
@ -125,9 +121,7 @@ int COMMON_CONTROL::ShowLibraryTable( const TOOL_EVENT& aEvent )
{
try // Pcb frame was not available, try to start it
{
KIFACE* kiface = m_frame->Kiway().KiFACE( KIWAY::FACE_PCB );
if( kiface )
if( KIFACE* kiface = m_frame->Kiway().KiFACE( KIWAY::FACE_PCB ) )
kiface->CreateKiWindow( m_frame, DIALOG_PCB_LIBRARY_TABLE, &m_frame->Kiway() );
}
catch( ... )
@ -141,9 +135,7 @@ int COMMON_CONTROL::ShowLibraryTable( const TOOL_EVENT& aEvent )
{
try // Kicad frame was not available, try to start it
{
KIFACE* kiface = m_frame->Kiway().KiFACE( KIWAY::FACE_SCH );
if( kiface )
if( KIFACE* kiface = m_frame->Kiway().KiFACE( KIWAY::FACE_SCH ) )
kiface->CreateKiWindow( m_frame, DIALOG_DESIGN_BLOCK_LIBRARY_TABLE, &m_frame->Kiway() );
}
catch( ... )

View File

@ -357,13 +357,13 @@ void WX_HTML_REPORT_PANEL::onBtnSaveToFile( wxCommandEvent& event )
{
fn = wxT( "report.txt" );
KIWAY_HOLDER* parent = dynamic_cast<KIWAY_HOLDER*>( m_parent );
if( parent )
if( KIWAY_HOLDER* parent = dynamic_cast<KIWAY_HOLDER*>( m_parent ) )
fn.SetPath( parent->Prj().GetProjectPath() );
}
else
{
fn = m_reportFileName;
}
wxWindow* topLevelParent = wxGetTopLevelParent( this );

View File

@ -82,7 +82,7 @@ static struct IFACE : public KIFACE_BASE
void OnKifaceEnd() override;
wxWindow* CreateKiWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway,
int aCtlBits = 0 ) override
int aCtlBits = 0 ) override
{
switch( aClassId )
{

View File

@ -55,7 +55,7 @@ static struct IFACE : public KIFACE_BASE, public UNITS_PROVIDER
void OnKifaceEnd() override;
wxWindow* CreateKiWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway,
int aCtlBits = 0 ) override
int aCtlBits = 0 ) override
{
switch( aClassId )
{

View File

@ -65,7 +65,7 @@ static struct IFACE : public KIFACE_BASE
void OnKifaceEnd() override {}
wxWindow* CreateKiWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway,
int aCtlBits = 0 ) override
int aCtlBits = 0 ) override
{
assert( false );
return nullptr;

View File

@ -39,7 +39,8 @@ static struct IFACE : public KIFACE_BASE
void OnKifaceEnd() override;
wxWindow* CreateKiWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway, int aCtlBits = 0 ) override
wxWindow* CreateKiWindow( wxWindow* aParent, int aClassId, KIWAY* aKiway,
int aCtlBits = 0 ) override
{
KIPYTHON_FRAME* frame = new KIPYTHON_FRAME( aKiway, aParent );