Unify handling for *::{get,set}State

Since these functions are exactly the same, and for whatever reason they
didn't just add them to the `IPluginBase` both `IComponent` and
`IEditController`. inherit from
This commit is contained in:
Robbert van der Helm
2020-12-17 17:52:51 +01:00
parent d8694b062b
commit fe2de8de8d
9 changed files with 136 additions and 108 deletions
+3 -6
View File
@@ -81,12 +81,9 @@ class Vst3PluginProxyImpl : public Vst3PluginProxy {
// From `IEditController`
tresult PLUGIN_API setComponentState(Steinberg::IBStream* state) override;
// FIXME: These are duplicate, we need to change the implementation to call
// this on either `object_instances[instance_id].component` or
// `object_instances[instance_id].edit_controller` depending on which
// one exists.
// tresult PLUGIN_API setState(Steinberg::IBStream* state) override;
// tresult PLUGIN_API getState(Steinberg::IBStream* state) override;
// `IEditController` also contains `getState()` and `setState()` functions.
// These are identical to those defiend in `IComponent` and they're thus
// handled in in the same function.
int32 PLUGIN_API getParameterCount() override;
tresult PLUGIN_API
getParameterInfo(int32 paramIndex,