diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/accelerators/cbvh_pbrt.cpp b/3d-viewer/3d_rendering/3d_render_raytracing/accelerators/cbvh_pbrt.cpp index 319689bf3a..7e6654f3dd 100644 --- a/3d-viewer/3d_rendering/3d_render_raytracing/accelerators/cbvh_pbrt.cpp +++ b/3d-viewer/3d_rendering/3d_render_raytracing/accelerators/cbvh_pbrt.cpp @@ -555,12 +555,12 @@ BVHBuildNode *CBVH_PBRT::recursiveBuild ( std::vector &primiti (mid <= end) ); if( (mid != start) && (mid != end) ) - // for lots of prims with large overlapping bounding boxes, this - // may fail to partition; in that case don't break and fall through - // to SPLITMETHOD::EQUAL_COUNTS break; } + // Intentionally fall through to SPLITMETHOD::EQUAL_COUNTS since prims + // with large overlapping bounding boxes may fail to partition + case SPLITMETHOD::EQUALCOUNTS: { // Partition primitives into equally-sized subsets diff --git a/common/common.cpp b/common/common.cpp index d630e5424e..7a58b3bcd8 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -415,7 +415,7 @@ wxString KIwxExpandEnvVars(const wxString& str) break; } - //else: fall through + // else fall through default: strResult += str_n; diff --git a/common/plotters/GERBER_plotter.cpp b/common/plotters/GERBER_plotter.cpp index 9685c4cd1f..abaeba6c47 100644 --- a/common/plotters/GERBER_plotter.cpp +++ b/common/plotters/GERBER_plotter.cpp @@ -824,7 +824,7 @@ void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize, case 900: case 2700: // rotation of 90 degrees or 270 swaps sizes std::swap( size.x, size.y ); - // Pass through + // Intentionally fall through case 0: case 1800: if( trace_mode == SKETCH ) diff --git a/common/widgets/lib_tree.cpp b/common/widgets/lib_tree.cpp index 20d74c8994..5d60b36945 100644 --- a/common/widgets/lib_tree.cpp +++ b/common/widgets/lib_tree.cpp @@ -358,7 +358,7 @@ void LIB_TREE::onQueryCharHook( wxKeyEvent& aKeyStroke ) toggleExpand( sel ); break; } - /* fall through, so the selected component will be treated as the selected one */ + // Intentionally fall through, so the selected component will be treated as the selected one default: aKeyStroke.Skip(); // Any other key: pass on to search box directly. diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp index 0038206ff3..4acac80fda 100644 --- a/cvpcb/cvpcb_mainframe.cpp +++ b/cvpcb/cvpcb_mainframe.cpp @@ -566,6 +566,8 @@ void CVPCB_MAINFRAME::SetFootprintFilter( // Extract the current search patten when needed m_currentSearchPattern = m_tcFilterString->GetValue(); + // Intentionally fall through since this uses the filter options passed in + case FOOTPRINTS_LISTBOX::UNFILTERED_FP_LIST: case FOOTPRINTS_LISTBOX::FILTERING_BY_PIN_COUNT: case FOOTPRINTS_LISTBOX::FILTERING_BY_LIBRARY: diff --git a/eeschema/netlist_object_list.cpp b/eeschema/netlist_object_list.cpp index aa5d75b607..a5ffab43d0 100644 --- a/eeschema/netlist_object_list.cpp +++ b/eeschema/netlist_object_list.cpp @@ -114,6 +114,8 @@ bool NETLIST_OBJECT_LIST::BuildNetListInfo( SCH_SHEET_LIST& aSheets ) if( net_item->GetNet() != 0 ) break; + // Intentionally fall through if there is no net assigned + case NET_SEGMENT: // Test connections point to point type without bus. if( net_item->GetNet() == 0 ) @@ -162,6 +164,8 @@ bool NETLIST_OBJECT_LIST::BuildNetListInfo( SCH_SHEET_LIST& aSheets ) if( net_item->m_BusNetCode != 0 ) break; + // Intentionally fall through if there is no bus assigned + case NET_BUS: // Control type connections point to point mode bus if( net_item->m_BusNetCode == 0 ) diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 8d6aa109c8..8bb182bc3d 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -843,7 +843,7 @@ SEARCH_RESULT MODULE::Visit( INSPECTOR inspector, void* testData, const KICAD_T if( result == SEARCH_RESULT::QUIT ) break; - // m_Drawings can hold TYPETEXTMODULE also, so fall thru + // Intentionally fall through since m_Drawings can hold TYPETEXTMODULE also case PCB_MODULE_EDGE_T: result = IterateForward( m_drawings, inspector, testData, p ); diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 05391bc44d..d9464800c3 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -1282,7 +1282,7 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() if( padlayers_mask[B_Paste] || padlayers_mask[F_Paste] ) error_msgs.Add( _( "Error: Connector pads are not on the solder paste layer\n" "Use SMD pads instead" ) ); - // Fall trough + // Intentionally fall through case PAD_ATTRIB_SMD: // SMD and Connector pads (One external copper layer only) { LSET innerlayers_mask = padlayers_mask & LSET::InternalCuMask(); diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 23487e0885..8357efb9b6 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -1160,6 +1160,8 @@ static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aTinLayer, D_P pad_dx = 0; pad_dy = 0; + // Intentionally fall through and treat a rectangle as a trapezoid with no sloped sides + case PAD_SHAPE_TRAPEZOID: { double coord[8] = diff --git a/pcbnew/gpcb_plugin.cpp b/pcbnew/gpcb_plugin.cpp index 145635a103..37794fe5cd 100644 --- a/pcbnew/gpcb_plugin.cpp +++ b/pcbnew/gpcb_plugin.cpp @@ -753,7 +753,7 @@ void GPCB_FPL_CACHE::parseParameters( wxArrayString& aParameterList, LINE_READER // Element descriptions can span multiple lines. line = aLineReader->ReadLine(); - // Fall through is intentional. + // Intentionally fall through case '\t': case ' ':