Fix some Wimplicit-fallthrough
A "fall through" comment is most portable way to indicate "no break, fallthru" cases. * __attribute__ ((fallthrough)) // is not portable * [[fallthrough]]; // is C++17
This commit is contained in:
parent
08d205c533
commit
c98fc1099d
|
@ -333,7 +333,7 @@ Automatable::protect_automation ()
|
||||||
l->set_automation_state (Off);
|
l->set_automation_state (Off);
|
||||||
break;
|
break;
|
||||||
case Latch:
|
case Latch:
|
||||||
// no break
|
/* fall through */
|
||||||
case Touch:
|
case Touch:
|
||||||
l->set_automation_state (Play);
|
l->set_automation_state (Play);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -681,10 +681,11 @@ LuaTableRef::set (lua_State* L)
|
||||||
}
|
}
|
||||||
// invalid userdata -- fall through
|
// invalid userdata -- fall through
|
||||||
}
|
}
|
||||||
// no break
|
/* fall through */
|
||||||
case LUA_TFUNCTION: // no support -- we could... string.format("%q", string.dump(value, true))
|
case LUA_TFUNCTION: // no support -- we could... string.format("%q", string.dump(value, true))
|
||||||
|
/* fall through */
|
||||||
case LUA_TTABLE: // no nested tables, sorry.
|
case LUA_TTABLE: // no nested tables, sorry.
|
||||||
case LUA_TNIL: // fallthrough
|
case LUA_TNIL:
|
||||||
default:
|
default:
|
||||||
// invalid value
|
// invalid value
|
||||||
lua_pop (L, 2);
|
lua_pop (L, 2);
|
||||||
|
|
|
@ -400,8 +400,8 @@ SessionPlaylists::maybe_delete_unused (boost::function<int(boost::shared_ptr<Pla
|
||||||
case 2:
|
case 2:
|
||||||
// delete this and all later
|
// delete this and all later
|
||||||
delete_remaining = true;
|
delete_remaining = true;
|
||||||
// no break;
|
|
||||||
|
|
||||||
|
/* fall through */
|
||||||
case 1:
|
case 1:
|
||||||
// delete this
|
// delete this
|
||||||
playlists_tbd.push_back (*x);
|
playlists_tbd.push_back (*x);
|
||||||
|
|
|
@ -438,8 +438,8 @@ Curve::multipoint_eval (double x) const
|
||||||
double x2 = x * x;
|
double x2 = x * x;
|
||||||
return ev->coeff[0] + (ev->coeff[1] * x) + (ev->coeff[2] * x2) + (ev->coeff[3] * x2 * x);
|
return ev->coeff[0] + (ev->coeff[1] * x) + (ev->coeff[2] * x2) + (ev->coeff[3] * x2 * x);
|
||||||
}
|
}
|
||||||
// no break, fallthru
|
/* fall through */
|
||||||
default: // Linear
|
case ControlList::Linear:
|
||||||
return before->value + (vdelta * (tdelta / trange));
|
return before->value + (vdelta * (tdelta / trange));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1037,8 +1037,10 @@ ArdourWidgets::ArdourIcon::render (cairo_t *cr,
|
||||||
case TransportPanic:
|
case TransportPanic:
|
||||||
icon_transport_panic (cr, width, height);
|
icon_transport_panic (cr, width, height);
|
||||||
break;
|
break;
|
||||||
case TransportStart: // no break
|
case TransportStart:
|
||||||
case TransportEnd: // no break
|
/* fall through */
|
||||||
|
case TransportEnd:
|
||||||
|
/* fall through */
|
||||||
case TransportRange:
|
case TransportRange:
|
||||||
icon_transport_ck (cr, icon, width, height);
|
icon_transport_ck (cr, icon, width, height);
|
||||||
break;
|
break;
|
||||||
|
@ -1063,8 +1065,10 @@ ArdourWidgets::ArdourIcon::render (cairo_t *cr,
|
||||||
case NudgeRight:
|
case NudgeRight:
|
||||||
icon_nudge_right (cr, width, height, fg_color);
|
icon_nudge_right (cr, width, height, fg_color);
|
||||||
break;
|
break;
|
||||||
case ZoomIn: // no break
|
case ZoomIn:
|
||||||
case ZoomOut: // no break
|
/* fall through */
|
||||||
|
case ZoomOut:
|
||||||
|
/* fall through */
|
||||||
case ZoomFull:
|
case ZoomFull:
|
||||||
icon_zoom (cr, icon, width, height, fg_color);
|
icon_zoom (cr, icon, width, height, fg_color);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user