Use wxFALLTHROUGH

This commit is contained in:
Paul Cornett
2017-10-17 09:21:45 -07:00
parent 4ec80a35f9
commit ed8a541463
5 changed files with 6 additions and 2 deletions

View File

@@ -432,6 +432,7 @@ void ListboxWidgetsPage::CreateLbox()
{ {
default: default:
wxFAIL_MSG( wxT("unexpected radio box selection") ); wxFAIL_MSG( wxT("unexpected radio box selection") );
wxFALLTHROUGH;
case LboxSel_Single: flags |= wxLB_SINGLE; break; case LboxSel_Single: flags |= wxLB_SINGLE; break;
case LboxSel_Extended: flags |= wxLB_EXTENDED; break; case LboxSel_Extended: flags |= wxLB_EXTENDED; break;

View File

@@ -698,6 +698,7 @@ void TextWidgetsPage::CreateText()
{ {
default: default:
wxFAIL_MSG( wxT("unexpected wrap style radio box selection") ); wxFAIL_MSG( wxT("unexpected wrap style radio box selection") );
wxFALLTHROUGH;
case WrapStyle_None: case WrapStyle_None:
flags |= wxTE_DONTWRAP; // same as wxHSCROLL flags |= wxTE_DONTWRAP; // same as wxHSCROLL

View File

@@ -120,7 +120,7 @@ static wxString GTKProcessMnemonics(const wxString& label, MnemonicsFlag flag)
labelGTK += wxT("_-"); labelGTK += wxT("_-");
break; break;
} }
//else: fall through wxFALLTHROUGH;
default: default:
if ( flag != MNEMONICS_REMOVE ) if ( flag != MNEMONICS_REMOVE )
@@ -137,7 +137,7 @@ static wxString GTKProcessMnemonics(const wxString& label, MnemonicsFlag flag)
labelGTK += wxT("__"); labelGTK += wxT("__");
break; break;
} }
//else: fall through wxFALLTHROUGH;
default: default:
labelGTK += ch; labelGTK += ch;

View File

@@ -155,6 +155,7 @@ static gboolean gtk_frame_focus_in_callback( GtkWidget *widget,
default: default:
g_source_remove( win->m_urgency_hint ); g_source_remove( win->m_urgency_hint );
// no break, fallthrough to remove hint too // no break, fallthrough to remove hint too
wxFALLTHROUGH;
case -1: case -1:
gtk_window_set_urgency_hint(GTK_WINDOW(widget), false); gtk_window_set_urgency_hint(GTK_WINDOW(widget), false);
win->m_urgency_hint = -2; win->m_urgency_hint = -2;

View File

@@ -872,6 +872,7 @@ void wxRichTextCtrl::OnMoveMouse(wxMouseEvent& event)
case wxDragError: case wxDragError:
wxLogError(wxT("An error occurred during drag and drop operation")); wxLogError(wxT("An error occurred during drag and drop operation"));
wxFALLTHROUGH;
case wxDragNone: case wxDragNone:
case wxDragCancel: case wxDragCancel:
Refresh(); // This is needed in wxMSW, otherwise resetting the position doesn't 'take' Refresh(); // This is needed in wxMSW, otherwise resetting the position doesn't 'take'