Avoid duplicate state restores
This commit is contained in:
parent
c8cc6bd26b
commit
c982ad9599
1 changed files with 7 additions and 8 deletions
|
@ -582,17 +582,16 @@ impl<P: Plugin> IEditController for Wrapper<'_, P> {
|
||||||
kResultOk
|
kResultOk
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn set_state(&self, state: SharedVstPtr<dyn IBStream>) -> tresult {
|
unsafe fn set_state(&self, _state: SharedVstPtr<dyn IBStream>) -> tresult {
|
||||||
// We have a single file component, so there's only one `set_state()` function. Unlike C++,
|
// We don't store any separate state here. The plugin's state will have been restored
|
||||||
// Rust allows you to have multiple methods with the same name when they're provided by
|
// through the component. Calling that same function here will likely lead to duplicate
|
||||||
// different treats, but because of the Rust implementation the host may call either of
|
// state restores
|
||||||
// these functions depending on how they're implemented
|
kResultOk
|
||||||
IComponent::set_state(self, state)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn get_state(&self, state: SharedVstPtr<dyn IBStream>) -> tresult {
|
unsafe fn get_state(&self, _state: SharedVstPtr<dyn IBStream>) -> tresult {
|
||||||
// Same for this function
|
// Same for this function
|
||||||
IComponent::get_state(self, state)
|
kResultOk
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn get_parameter_count(&self) -> i32 {
|
unsafe fn get_parameter_count(&self) -> i32 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue