mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 12:30:00 +02:00
Use the univeral tresult in IComponent creation
This commit is contained in:
@@ -56,13 +56,18 @@ void Vst3Logger::log_response(bool is_host_vst, const Ack&) {
|
||||
|
||||
void Vst3Logger::log_response(
|
||||
bool is_host_vst,
|
||||
const std::optional<YaComponent::CreateArgs>& args) {
|
||||
const std::variant<YaComponent::CreateArgs, UniversalTResult>& result) {
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
if (args) {
|
||||
message << "<IComponent* #" << args->instance_id << ">";
|
||||
} else {
|
||||
message << "<nullptr>";
|
||||
}
|
||||
std::visit(overload{[&](const YaComponent::CreateArgs& args) {
|
||||
message << "<IComponent* #" << args.instance_id
|
||||
<< ">";
|
||||
},
|
||||
[&](const UniversalTResult& code) {
|
||||
// TODO: Add a `UniversalTResult::string()` for
|
||||
// the human readable representation
|
||||
message << code.native();
|
||||
}},
|
||||
result);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,9 @@ class Vst3Logger {
|
||||
void log_request(bool is_host_vst, const WantsPluginFactory&);
|
||||
|
||||
void log_response(bool is_host_vst, const Ack&);
|
||||
void log_response(bool is_host_vst,
|
||||
const std::optional<YaComponent::CreateArgs>&);
|
||||
void log_response(
|
||||
bool is_host_vst,
|
||||
const std::variant<YaComponent::CreateArgs, UniversalTResult>&);
|
||||
void log_response(bool is_host_vst, const Configuration&);
|
||||
void log_response(bool is_host_vst, const YaPluginFactory&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user