Rename Create/Destroy to Construct/Destruct

This is less likely to clash with names used by interfaces and it's a
bit clearer what's going on (since they are basically proxies for
constructors and destructors).
This commit is contained in:
Robbert van der Helm
2020-12-12 16:16:18 +01:00
parent 1088483f15
commit f637e6ad18
9 changed files with 33 additions and 33 deletions
+5 -5
View File
@@ -51,8 +51,8 @@ void Vst3Bridge::run() {
sockets.host_vst_control.receive_messages(
std::nullopt,
overload{
[&](const YaComponent::Create& args)
-> YaComponent::Create::Response {
[&](const YaComponent::Construct& args)
-> YaComponent::Construct::Response {
Steinberg::TUID cid;
std::copy(args.cid.begin(), args.cid.end(), cid);
Steinberg::IPtr<Steinberg::Vst::IComponent> component =
@@ -64,15 +64,15 @@ void Vst3Bridge::run() {
const size_t instance_id = generate_instance_id();
component_instances[instance_id] = std::move(component);
return YaComponent::CreateArgs(
return YaComponent::ConstructArgs(
component_instances[instance_id], instance_id);
} else {
// The actual result is lost here
return UniversalTResult(Steinberg::kNotImplemented);
}
},
[&](const YaComponent::Destroy& request)
-> YaComponent::Destroy::Response {
[&](const YaComponent::Destruct& request)
-> YaComponent::Destruct::Response {
std::lock_guard lock(component_instances_mutex);
component_instances.erase(request.instance_id);