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