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);
|
||||
break;
|
||||
case Latch:
|
||||
// no break
|
||||
/* fall through */
|
||||
case Touch:
|
||||
l->set_automation_state (Play);
|
||||
break;
|
||||
|
@ -681,10 +681,11 @@ LuaTableRef::set (lua_State* L)
|
||||
}
|
||||
// invalid userdata -- fall through
|
||||
}
|
||||
// no break
|
||||
/* fall through */
|
||||
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_TNIL: // fallthrough
|
||||
case LUA_TNIL:
|
||||
default:
|
||||
// invalid value
|
||||
lua_pop (L, 2);
|
||||
|
@ -400,8 +400,8 @@ SessionPlaylists::maybe_delete_unused (boost::function<int(boost::shared_ptr<Pla
|
||||
case 2:
|
||||
// delete this and all later
|
||||
delete_remaining = true;
|
||||
// no break;
|
||||
|
||||
/* fall through */
|
||||
case 1:
|
||||
// delete this
|
||||
playlists_tbd.push_back (*x);
|
||||
|
@ -438,8 +438,8 @@ Curve::multipoint_eval (double x) const
|
||||
double x2 = x * x;
|
||||
return ev->coeff[0] + (ev->coeff[1] * x) + (ev->coeff[2] * x2) + (ev->coeff[3] * x2 * x);
|
||||
}
|
||||
// no break, fallthru
|
||||
default: // Linear
|
||||
/* fall through */
|
||||
case ControlList::Linear:
|
||||
return before->value + (vdelta * (tdelta / trange));
|
||||
}
|
||||
}
|
||||
|
@ -1037,8 +1037,10 @@ ArdourWidgets::ArdourIcon::render (cairo_t *cr,
|
||||
case TransportPanic:
|
||||
icon_transport_panic (cr, width, height);
|
||||
break;
|
||||
case TransportStart: // no break
|
||||
case TransportEnd: // no break
|
||||
case TransportStart:
|
||||
/* fall through */
|
||||
case TransportEnd:
|
||||
/* fall through */
|
||||
case TransportRange:
|
||||
icon_transport_ck (cr, icon, width, height);
|
||||
break;
|
||||
@ -1063,8 +1065,10 @@ ArdourWidgets::ArdourIcon::render (cairo_t *cr,
|
||||
case NudgeRight:
|
||||
icon_nudge_right (cr, width, height, fg_color);
|
||||
break;
|
||||
case ZoomIn: // no break
|
||||
case ZoomOut: // no break
|
||||
case ZoomIn:
|
||||
/* fall through */
|
||||
case ZoomOut:
|
||||
/* fall through */
|
||||
case ZoomFull:
|
||||
icon_zoom (cr, icon, width, height, fg_color);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user