Fix unannotated fall-through warnings

This commit is contained in:
Maarten Bent
2018-11-25 20:22:44 +01:00
parent 39ff5b90e5
commit eb23d4735c
47 changed files with 84 additions and 77 deletions

View File

@@ -433,7 +433,7 @@ void BitmapComboBoxWidgetsPage::CreateCombo()
{
default:
wxFAIL_MSG( "unknown combo kind" );
// fall through
wxFALLTHROUGH;
case ComboKind_Default:
break;

View File

@@ -416,7 +416,7 @@ void ButtonWidgetsPage::CreateButton()
default:
wxFAIL_MSG("unexpected radiobox selection");
// fall through
wxFALLTHROUGH;
case ButtonHAlign_Centre:
break;
@@ -434,7 +434,7 @@ void ButtonWidgetsPage::CreateButton()
default:
wxFAIL_MSG("unexpected radiobox selection");
// fall through
wxFALLTHROUGH;
case ButtonVAlign_Centre:
// centre vertical alignment is the default (no style)

View File

@@ -259,7 +259,7 @@ void CheckBoxWidgetsPage::CreateCheckbox()
{
default:
wxFAIL_MSG("unexpected radiobox selection");
// fall through
wxFALLTHROUGH;
case CheckboxKind_2State:
flags |= wxCHK_2STATE;
@@ -267,7 +267,7 @@ void CheckBoxWidgetsPage::CreateCheckbox()
case CheckboxKind_3StateUser:
flags |= wxCHK_ALLOW_3RD_STATE_FOR_USER;
// fall through
wxFALLTHROUGH;
case CheckboxKind_3State:
flags |= wxCHK_3STATE;

View File

@@ -431,7 +431,7 @@ void ComboboxWidgetsPage::CreateCombo()
{
default:
wxFAIL_MSG( "unknown combo kind" );
// fall through
wxFALLTHROUGH;
case ComboKind_Default:
break;

View File

@@ -366,7 +366,7 @@ void HyperlinkWidgetsPage::OnAlignment(wxCommandEvent& WXUNUSED(event))
default:
case Align_Max:
wxFAIL_MSG( "unknown alignment" );
// fall through
wxFALLTHROUGH;
case Align_Left:
addstyle = wxHL_ALIGN_LEFT;

View File

@@ -343,7 +343,7 @@ void BookWidgetsPage::RecreateBook()
{
default:
wxFAIL_MSG( "unknown orientation" );
// fall through
wxFALLTHROUGH;
case Orient_Top:
flags |= wxBK_TOP;

View File

@@ -376,7 +376,7 @@ void RadioWidgetsPage::CreateRadio()
{
default:
wxFAIL_MSG( "unexpected wxRadioBox layout direction" );
// fall through
wxFALLTHROUGH;
case RadioDir_Default:
break;

View File

@@ -368,7 +368,7 @@ void SpinBtnWidgetsPage::CreateSpin()
{
default:
wxFAIL_MSG("unexpected radiobox selection");
// fall through
wxFALLTHROUGH;
case Align_Left:
textFlags |= wxALIGN_LEFT; // no-op

View File

@@ -417,7 +417,7 @@ void StaticWidgetsPage::CreateStatic()
{
default:
wxFAIL_MSG("unexpected radiobox selection");
// fall through
wxFALLTHROUGH;
case StaticHAlign_Left:
align |= wxALIGN_LEFT;
@@ -436,7 +436,7 @@ void StaticWidgetsPage::CreateStatic()
{
default:
wxFAIL_MSG("unexpected radiobox selection");
// fall through
wxFALLTHROUGH;
case StaticVAlign_Top:
align |= wxALIGN_TOP;
@@ -457,7 +457,7 @@ void StaticWidgetsPage::CreateStatic()
{
default:
wxFAIL_MSG("unexpected radiobox selection");
// fall through
wxFALLTHROUGH;
case StaticEllipsize_Start:
flagsDummyText |= wxST_ELLIPSIZE_START;

View File

@@ -293,7 +293,7 @@ private:
{
default:
wxFAIL_MSG( "unexpected HitTest() result" );
// fall through
wxFALLTHROUGH;
case wxTE_HT_UNKNOWN:
x = y = -1;
@@ -690,6 +690,7 @@ void TextWidgetsPage::CreateText()
{
default:
wxFAIL_MSG( "unexpected lines radio box selection" );
wxFALLTHROUGH;
case TextLines_Single:
break;
@@ -755,6 +756,7 @@ void TextWidgetsPage::CreateText()
{
default:
wxFAIL_MSG( "unexpected kind radio box selection" );
wxFALLTHROUGH;
case TextKind_Plain:
break;

View File

@@ -379,7 +379,7 @@ void ToggleWidgetsPage::CreateToggle()
default:
wxFAIL_MSG("unexpected radiobox selection");
// fall through
wxFALLTHROUGH;
case ToggleHAlign_Centre:
break;
@@ -397,7 +397,7 @@ void ToggleWidgetsPage::CreateToggle()
default:
wxFAIL_MSG("unexpected radiobox selection");
// fall through
wxFALLTHROUGH;
case ToggleVAlign_Centre:
// centre vertical alignment is the default (no style)

View File

@@ -902,7 +902,7 @@ void WidgetsFrame::OnSetBorder(wxCommandEvent& event)
default:
wxFAIL_MSG( "unknown border style" );
// fall through
wxFALLTHROUGH;
case Widgets_BorderDefault: border = wxBORDER_DEFAULT; break;
}