1
0
Fork 0

Clean up parameter access conditionals

I forgot this works as an else if
This commit is contained in:
Robbert van der Helm 2022-01-27 19:36:36 +01:00
parent 338abf7367
commit 1f0dbdbbec

View file

@ -323,8 +323,7 @@ impl<P: Plugin> IEditController for Wrapper<P> {
} }
kResultOk kResultOk
} else if self.param_id_hashes.contains_key(&id) { } else if let Some(param_id) = self.param_id_hashes.get(&id) {
let param_id = &self.param_id_hashes[&id];
let param_ptr = &self.param_map[param_id]; let param_ptr = &self.param_map[param_id];
u16strlcpy( u16strlcpy(
dest, dest,
@ -357,8 +356,7 @@ impl<P: Plugin> IEditController for Wrapper<P> {
*value_normalized = value; *value_normalized = value;
kResultOk kResultOk
} else if self.param_id_hashes.contains_key(&id) { } else if let Some(param_id) = self.param_id_hashes.get(&id) {
let param_id = &self.param_id_hashes[&id];
let param_ptr = &self.param_map[param_id]; let param_ptr = &self.param_map[param_id];
let value = match param_ptr.string_to_normalized_value(&string) { let value = match param_ptr.string_to_normalized_value(&string) {
Some(v) => v as f64, Some(v) => v as f64,