diff --git a/bitmap2component/bitmap2cmp_main.cpp b/bitmap2component/bitmap2cmp_main.cpp
index e0c6636a08..d7be15d953 100644
--- a/bitmap2component/bitmap2cmp_main.cpp
+++ b/bitmap2component/bitmap2cmp_main.cpp
@@ -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() );
diff --git a/common/tool/common_control.cpp b/common/tool/common_control.cpp
index f9d0717f92..5094cd7cb9 100644
--- a/common/tool/common_control.cpp
+++ b/common/tool/common_control.cpp
@@ -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( ... )
diff --git a/common/widgets/wx_html_report_panel.cpp b/common/widgets/wx_html_report_panel.cpp
index c74aa01c0e..d7b800c01e 100644
--- a/common/widgets/wx_html_report_panel.cpp
+++ b/common/widgets/wx_html_report_panel.cpp
@@ -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 );
 
diff --git a/cvpcb/cvpcb.cpp b/cvpcb/cvpcb.cpp
index 253f73ae4c..b6708e519e 100644
--- a/cvpcb/cvpcb.cpp
+++ b/cvpcb/cvpcb.cpp
@@ -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 )
         {
diff --git a/pagelayout_editor/pl_editor.cpp b/pagelayout_editor/pl_editor.cpp
index cc01d7bbbe..0d5bc1c068 100644
--- a/pagelayout_editor/pl_editor.cpp
+++ b/pagelayout_editor/pl_editor.cpp
@@ -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 )
         {
diff --git a/qa/qa_utils/test_app_main.cpp b/qa/qa_utils/test_app_main.cpp
index d89956d89b..150bcb838d 100644
--- a/qa/qa_utils/test_app_main.cpp
+++ b/qa/qa_utils/test_app_main.cpp
@@ -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;
diff --git a/scripting/kicad_scripting_main.cpp b/scripting/kicad_scripting_main.cpp
index a2bed14049..f29a46bb87 100644
--- a/scripting/kicad_scripting_main.cpp
+++ b/scripting/kicad_scripting_main.cpp
@@ -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 );