Rename .is_bypass() to .make_bypass()
Because just like `.bypass()` sounds like a getter, so does `.is_bypass()`.
This commit is contained in:
parent
f37974448d
commit
8d71369b2e
3 changed files with 3 additions and 3 deletions
|
@ -186,7 +186,7 @@ impl BoolParam {
|
|||
/// their UI. Only a single [`BoolParam`] can be a bypass parmaeter, and NIH-plug will add one
|
||||
/// if you don't create one yourself. You will need to implement this yourself if your plugin
|
||||
/// introduces latency.
|
||||
pub fn is_bypass(mut self) -> Self {
|
||||
pub fn make_bypass(mut self) -> Self {
|
||||
self.flags.insert(ParamFlags::BYPASS);
|
||||
self
|
||||
}
|
||||
|
|
|
@ -352,7 +352,7 @@ impl<P: ClapPlugin> Wrapper<P> {
|
|||
let is_bypass = flags.contains(ParamFlags::BYPASS);
|
||||
if cfg!(debug_assertions) {
|
||||
if id == BYPASS_PARAM_ID && !is_bypass {
|
||||
nih_debug_assert_failure!("Bypass parameters need to be marked with `.is_bypass()`, weird things will happen");
|
||||
nih_debug_assert_failure!("Bypass parameters need to be marked with `.make_bypass()`, weird things will happen");
|
||||
}
|
||||
if is_bypass && matches!(bypass, Bypass::Parameter(_)) {
|
||||
nih_debug_assert_failure!(
|
||||
|
|
|
@ -168,7 +168,7 @@ impl<P: Vst3Plugin> WrapperInner<P> {
|
|||
let is_bypass = flags.contains(ParamFlags::BYPASS);
|
||||
if cfg!(debug_assertions) {
|
||||
if id == BYPASS_PARAM_ID && !is_bypass {
|
||||
nih_debug_assert_failure!("Bypass parameters need to be marked with `.is_bypass()`, weird things will happen");
|
||||
nih_debug_assert_failure!("Bypass parameters need to be marked with `.make_bypass()`, weird things will happen");
|
||||
}
|
||||
if is_bypass && matches!(bypass, Bypass::Parameter(_)) {
|
||||
nih_debug_assert_failure!(
|
||||
|
|
Loading…
Add table
Reference in a new issue