diff --git a/src/common/logging/vst3.cpp b/src/common/logging/vst3.cpp index 77e9bdec..61c67816 100644 --- a/src/common/logging/vst3.cpp +++ b/src/common/logging/vst3.cpp @@ -44,7 +44,7 @@ void Vst3Logger::log_request(bool is_host_vst, const WantsPluginFactory&) { void Vst3Logger::log_response( bool is_host_vst, - const std::optional& args) { + const std::optional& args) { log_response_base(is_host_vst, [&](auto& message) { if (args) { message << "instance_id << ">"; diff --git a/src/common/logging/vst3.h b/src/common/logging/vst3.h index 529ce3ba..78b69176 100644 --- a/src/common/logging/vst3.h +++ b/src/common/logging/vst3.h @@ -52,7 +52,7 @@ class Vst3Logger { void log_request(bool is_host_vst, const WantsPluginFactory&); void log_response(bool is_host_vst, - const std::optional&); + const std::optional&); void log_response(bool is_host_vst, const Configuration&); void log_response(bool is_host_vst, const YaPluginFactory&); diff --git a/src/common/serialization/vst3/component.cpp b/src/common/serialization/vst3/component.cpp index 1db52fcf..494b5f18 100644 --- a/src/common/serialization/vst3/component.cpp +++ b/src/common/serialization/vst3/component.cpp @@ -16,9 +16,9 @@ #include "component.h" -YaComponent::Arguments::Arguments() {} +YaComponent::CreateArgs::CreateArgs() {} -YaComponent::Arguments::Arguments( +YaComponent::CreateArgs::CreateArgs( Steinberg::IPtr component, size_t instance_id) : instance_id(instance_id) { @@ -29,7 +29,7 @@ YaComponent::Arguments::Arguments( } } -YaComponent::YaComponent(const Arguments&& args) : arguments(std::move(args)) { +YaComponent::YaComponent(const CreateArgs&& args) : arguments(std::move(args)) { FUNKNOWN_CTOR // Everything else is handled directly through callbacks to minimize the diff --git a/src/common/serialization/vst3/component.h b/src/common/serialization/vst3/component.h index b025a785..f1fb4802 100644 --- a/src/common/serialization/vst3/component.h +++ b/src/common/serialization/vst3/component.h @@ -47,14 +47,14 @@ class YaComponent : public Steinberg::Vst::IComponent { /** * These are the arguments for creating a `YaComponentPluginImpl`. */ - struct Arguments { - Arguments(); + struct CreateArgs { + CreateArgs(); /** * Read arguments from an existing implementation. */ - Arguments(Steinberg::IPtr component, - size_t isntance_id); + CreateArgs(Steinberg::IPtr component, + size_t isntance_id); /** * The unique identifier for this specific instance. @@ -83,7 +83,7 @@ class YaComponent : public Steinberg::Vst::IComponent { */ struct Create { // TODO: Create a `native_tvalue` wrapper, and then also add them here - using Response = std::optional; + using Response = std::optional; ArrayUID cid; @@ -97,7 +97,7 @@ class YaComponent : public Steinberg::Vst::IComponent { * Instantiate this instance with arguments read from another interface * implementation. */ - YaComponent(const Arguments&& args); + YaComponent(const CreateArgs&& args); /** * @remark The plugin side implementation should send a control message to @@ -137,14 +137,14 @@ class YaComponent : public Steinberg::Vst::IComponent { getState(Steinberg::IBStream* state) override = 0; private: - Arguments arguments; + CreateArgs arguments; // TODO: As explained in a few other places, `YaComponent` objects should be // assigned a unique ID for identification }; template -void serialize(S& s, std::optional& args) { +void serialize(S& s, std::optional& args) { s.ext(args, bitsery::ext::StdOptional{}); } diff --git a/src/plugin/bridges/vst3-impls/component.cpp b/src/plugin/bridges/vst3-impls/component.cpp index 1b8b0db1..52ff91ad 100644 --- a/src/plugin/bridges/vst3-impls/component.cpp +++ b/src/plugin/bridges/vst3-impls/component.cpp @@ -17,7 +17,7 @@ #include "component.h" YaComponentPluginImpl::YaComponentPluginImpl(Vst3PluginBridge& bridge, - YaComponent::Arguments&& args) + YaComponent::CreateArgs&& args) : YaComponent(std::move(args)), bridge(bridge) {} YaComponentPluginImpl::~YaComponentPluginImpl() { diff --git a/src/plugin/bridges/vst3-impls/component.h b/src/plugin/bridges/vst3-impls/component.h index a9f34b84..afe2edfe 100644 --- a/src/plugin/bridges/vst3-impls/component.h +++ b/src/plugin/bridges/vst3-impls/component.h @@ -21,7 +21,7 @@ class YaComponentPluginImpl : public YaComponent { public: YaComponentPluginImpl(Vst3PluginBridge& bridge, - YaComponent::Arguments&& args); + YaComponent::CreateArgs&& args); /** * When the reference count reaches zero and this destructor is called, diff --git a/src/plugin/bridges/vst3-impls/plugin-factory.cpp b/src/plugin/bridges/vst3-impls/plugin-factory.cpp index 07ac1c19..e77c3191 100644 --- a/src/plugin/bridges/vst3-impls/plugin-factory.cpp +++ b/src/plugin/bridges/vst3-impls/plugin-factory.cpp @@ -31,7 +31,7 @@ YaPluginFactoryPluginImpl::createInstance(Steinberg::FIDString cid, ArrayUID cid_array; std::copy(cid, cid + sizeof(Steinberg::TUID), cid_array.begin()); if (Steinberg::FIDStringsEqual(_iid, Steinberg::Vst::IComponent::iid)) { - std::optional args = + std::optional args = bridge.send_message(YaComponent::Create{.cid = cid_array}); if (args) { // I find all of these raw pointers scary diff --git a/src/wine-host/bridges/vst3.cpp b/src/wine-host/bridges/vst3.cpp index 060c80be..1fc887e4 100644 --- a/src/wine-host/bridges/vst3.cpp +++ b/src/wine-host/bridges/vst3.cpp @@ -64,7 +64,7 @@ void Vst3Bridge::run() { const size_t instance_id = generate_instance_id(); component_instances[instance_id] = std::move(component); - return std::make_optional( + return std::make_optional( component_instances[instance_id], instance_id); } else { return std::nullopt;