Everywhere: Add break after the last case label before default

We already do this in most places, so the style should be consistent.
Also, Clang does not like it, as this could cause an unexpected compile
error if some statements are added to the default label or a new label
is added above it.
This commit is contained in:
Daniel Bertalan 2021-07-05 19:17:08 +02:00 committed by Gunnar Beutner
parent b0208ce433
commit 98a9a1d7f9
Notes: sideshowbarker 2024-07-18 10:05:56 +09:00
7 changed files with 7 additions and 1 deletions

View file

@ -41,6 +41,7 @@ void TimelineTrack::event(Core::Event& event)
case GUI::Event::MouseDown:
case GUI::Event::MouseMove:
event.ignore();
break;
default:
break;
}

View file

@ -298,8 +298,8 @@ void ColumnsView::move_cursor(CursorMovement movement, SelectionUpdate selection
if (model.is_valid(cursor_index()))
push_column(cursor_index());
update();
break;
}
break;
default:
break;
}

View file

@ -244,6 +244,7 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
case CSS::ValueID::LineThrough:
case CSS::ValueID::Blink:
set_property_expanding_shorthands(style, CSS::PropertyID::TextDecorationLine, value, document);
break;
default:
break;
}

View file

@ -345,6 +345,7 @@ void TaskbarWindow::wm_event(GUI::WMEvent& event)
case GUI::Event::WM_VirtualDesktopChanged: {
auto& changed_event = static_cast<GUI::WMVirtualDesktopChangedEvent&>(event);
virtual_desktop_change_event(changed_event.current_row(), changed_event.current_column());
break;
}
default:
break;

View file

@ -184,6 +184,7 @@ int print_space_usage(const String& path, const DuOption& du_option, int max_dep
break;
case DuOption::TimeType::Status:
time = path_stat.st_ctime;
break;
default:
break;
}

View file

@ -963,6 +963,7 @@ int main(int argc, char** argv)
break;
case JS::TokenCategory::Identifier:
stylize({ start, end }, { Line::Style::Foreground(Line::Style::XtermColor::White), Line::Style::Bold });
break;
default:
break;
}

View file

@ -165,6 +165,7 @@ int main()
break;
case SQL::AST::TokenCategory::Identifier:
editor.stylize({ start, end }, { Line::Style::Foreground(Line::Style::XtermColor::White), Line::Style::Bold });
break;
default:
break;
}