C++11 fallthrough (2/2)

This commit is contained in:
Robin Gareus 2023-05-19 05:34:10 +02:00
parent f02e5d3a9f
commit 157ccbbdb5
11 changed files with 32 additions and 33 deletions

View File

@ -810,7 +810,7 @@ If you still wish to proceed, please use the\n\n\
msg.run (); msg.run ();
return; return;
} }
/* fallthrough */ [[fallthrough]];
case 0: case 0:
_session->remove_pending_capture_state (); _session->remove_pending_capture_state ();
break; break;
@ -970,7 +970,7 @@ If you still wish to proceed, please use the\n\n\
msg.run (); msg.run ();
return; return;
} }
/* fallthrough */ [[fallthrough]];
case 0: case 0:
_session->remove_pending_capture_state (); _session->remove_pending_capture_state ();
break; break;

View File

@ -489,7 +489,7 @@ AudioClock::end_edit (bool modify)
break; break;
case Seconds: case Seconds:
/* fallthrough */ [[fallthrough]];
case Samples: case Samples:
if (edit_string.length() < 1) { if (edit_string.length() < 1) {
edit_string = pre_edit_string; edit_string = pre_edit_string;

View File

@ -5176,8 +5176,7 @@ Editor::get_preferred_edit_position (EditIgnoreOption ignore, bool from_context_
break; break;
} }
} }
/* fallthrough */ [[fallthrough]];
default: default:
case EditAtMouse: case EditAtMouse:
if (!mouse_sample (ms, ignored)) { if (!mouse_sample (ms, ignored)) {
@ -6840,14 +6839,14 @@ Editor::default_time_domain () const
switch (_grid_type) { switch (_grid_type) {
case GridTypeNone: case GridTypeNone:
/* fallthrough */ [[fallthrough]];
case GridTypeMinSec: case GridTypeMinSec:
/* fallthrough */ [[fallthrough]];
case GridTypeCDFrame: case GridTypeCDFrame:
/* fallthrough */ [[fallthrough]];
case GridTypeTimecode: case GridTypeTimecode:
/* fallthrough */
return AudioTime; return AudioTime;
[[fallthrough]];
default: default:
break; break;
} }

View File

@ -1073,7 +1073,7 @@ Editor::finish_bringing_in_material (std::shared_ptr<Region> region,
} }
case ImportAsTrigger: case ImportAsTrigger:
/* fallthrough */ [[fallthrough]];
case ImportAsTrack: case ImportAsTrack:
{ {
if (!existing_track) { if (!existing_track) {

View File

@ -2738,7 +2738,7 @@ Editor::cut_copy_section (bool copy)
break; break;
case SectionSelectRetainAndMovePlayhead: case SectionSelectRetainAndMovePlayhead:
_session->request_locate (copy ? to_end.samples (): to.samples ()); _session->request_locate (copy ? to_end.samples (): to.samples ());
/* fallthough */ [[fallthrough]];
case SectionSelectRetain: case SectionSelectRetain:
if (!copy || to < end) { if (!copy || to < end) {
selection->set (to, to_end); selection->set (to, to_end);

View File

@ -190,8 +190,8 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Item& parent, std::s
*/ */
switch (_type) { switch (_type) {
case Mark: /* fallthough */ case Mark: [[fallthrough]];
case RegionCue: /* fallthough */ case RegionCue: [[fallthrough]];
case BBTPosition: case BBTPosition:
points = new ArdourCanvas::Points (); points = new ArdourCanvas::Points ();
@ -297,13 +297,13 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Item& parent, std::s
switch (_type) { switch (_type) {
case RegionCue: case RegionCue:
/* fallthrough */ [[fallthrough]];
case Meter: case Meter:
/* fallthrough */ [[fallthrough]];
case Tempo: case Tempo:
/* fallthrough */ [[fallthrough]];
case SelectionStart: case SelectionStart:
/* fallthrough */ [[fallthrough]];
case SelectionEnd: case SelectionEnd:
_name_flag = 0; _name_flag = 0;
break; break;
@ -325,7 +325,7 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Item& parent, std::s
switch (_type) { switch (_type) {
case SelectionStart: case SelectionStart:
/* fallthrough */ [[fallthrough]];
case SelectionEnd: case SelectionEnd:
_pcue->hide(); _pcue->hide();
_pmark->show(); _pmark->show();

View File

@ -516,7 +516,7 @@ meter_render_ticks (Gtk::Widget& w, MeterType type, vector<ARDOUR::DataType> typ
points.insert (std::pair<float,float>( 3, 1.0)); points.insert (std::pair<float,float>( 3, 1.0));
points.insert (std::pair<float,float>( 4, 0.5)); points.insert (std::pair<float,float>( 4, 0.5));
points.insert (std::pair<float,float>( 5, 0.5)); points.insert (std::pair<float,float>( 5, 0.5));
/* fallthrough */ [[fallthrough]];
case MeterPeak0dB: case MeterPeak0dB:
points.insert (std::pair<float,float>(-60, 0.5)); points.insert (std::pair<float,float>(-60, 0.5));
points.insert (std::pair<float,float>(-50, 1.0)); points.insert (std::pair<float,float>(-50, 1.0));
@ -752,12 +752,12 @@ meter_render_metrics (Gtk::Widget& w, MeterType type, vector<DataType> types)
points.insert (std::pair<float,string>( 0.0f, "+20")); points.insert (std::pair<float,string>( 0.0f, "+20"));
break; break;
case MeterPeak: case MeterPeak:
/* fallthrough */ [[fallthrough]];
case MeterKrms: case MeterKrms:
/* fallthrough */ [[fallthrough]];
default: default:
points.insert (std::pair<float,string>( 3.0f, "+3")); points.insert (std::pair<float,string>( 3.0f, "+3"));
/* fallthrough */ [[fallthrough]];
case MeterPeak0dB: case MeterPeak0dB:
points.insert (std::pair<float,string>(-50.0f, "-50")); points.insert (std::pair<float,string>(-50.0f, "-50"));
points.insert (std::pair<float,string>(-40.0f, "-40")); points.insert (std::pair<float,string>(-40.0f, "-40"));

View File

@ -327,16 +327,16 @@ APianoKeyboard::handle_fixed_keys (GdkEventKey* ev)
} else if (ev->type == GDK_KEY_RELEASE) { } else if (ev->type == GDK_KEY_RELEASE) {
switch (ev->keyval) { switch (ev->keyval) {
case GDK_KEY_F1: case GDK_KEY_F1:
/* fallthrough */ [[fallthrough]];
case GDK_KEY_F2: case GDK_KEY_F2:
/* fallthrough */ [[fallthrough]];
case GDK_KEY_F3: case GDK_KEY_F3:
/* fallthrough */ [[fallthrough]];
case GDK_KEY_F4: case GDK_KEY_F4:
PitchBend (8192, false); PitchBend (8192, false);
break; break;
case GDK_KEY_Up: case GDK_KEY_Up:
/* fallthrough */ [[fallthrough]];
case GDK_KEY_Down: case GDK_KEY_Down:
PitchBend (8192, true); PitchBend (8192, true);
return true; return true;

View File

@ -615,12 +615,12 @@ TrackRecordAxis::entry_key_press (GdkEventKey* ev)
{ {
switch (ev->keyval) { switch (ev->keyval) {
case GDK_Escape: case GDK_Escape:
/* fallthrough */ [[fallthrough]];
case GDK_ISO_Left_Tab: case GDK_ISO_Left_Tab:
/* fallthrough */ [[fallthrough]];
case GDK_Tab: case GDK_Tab:
/* fallthrough */
return true; return true;
[[fallthrough]];
default: default:
break; break;
} }

View File

@ -339,12 +339,12 @@ TriggerUI::entry_key_press (GdkEventKey* ev)
{ {
switch (ev->keyval) { switch (ev->keyval) {
case GDK_Escape: case GDK_Escape:
/* fallthrough */ [[fallthrough]];
case GDK_ISO_Left_Tab: case GDK_ISO_Left_Tab:
/* fallthrough */ [[fallthrough]];
case GDK_Tab: case GDK_Tab:
/* fallthrough */
return true; return true;
[[fallthrough]];
default: default:
break; break;
} }

View File

@ -231,7 +231,7 @@ VSTPluginUI::dispatch_effeditkey (GdkEventKey* gdk_key)
special_key = 15; special_key = 15;
break; break;
case GDK_Page_Down: case GDK_Page_Down:
/* fallthrough */ [[fallthrough]];
case GDK_KP_Page_Down: case GDK_KP_Page_Down:
special_key = 16; special_key = 16;
break; break;