1
0
Fork 0

Rename .is_bypass() to .make_bypass()

Because just like `.bypass()` sounds like a getter, so does
`.is_bypass()`.
This commit is contained in:
Robbert van der Helm 2022-03-27 03:45:06 +02:00
parent f37974448d
commit 8d71369b2e
3 changed files with 3 additions and 3 deletions

View file

@ -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
}

View file

@ -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!(

View file

@ -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!(