Remove null pointer support in setComponentHandler

This should be an implementation fault.
This commit is contained in:
Robbert van der Helm
2020-12-22 13:54:55 +01:00
parent 37897da2b7
commit 51876a024c
4 changed files with 28 additions and 47 deletions
+2 -7
View File
@@ -209,13 +209,8 @@ bool Vst3Logger::log_request(
const YaEditController::SetComponentHandler& request) {
return log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IEditController::setComponentHandler(handler = ";
if (request.component_handler_proxy_args) {
message << "<IComponentHandler*>";
} else {
message << "<nullptr>";
}
message << ")";
<< ": IEditController::setComponentHandler(handler = "
"<IComponentHandler*>)";
});
}
@@ -345,18 +345,12 @@ class YaEditController : public Steinberg::Vst::IEditController {
native_size_t instance_id;
/**
* Arguments for instantiating the proxy object. Even though it should
* never happen, if the host passed a null pointer to this function
* we'll mimic that as well.
*/
std::optional<Vst3ComponentHandlerProxy::ConstructArgs>
component_handler_proxy_args;
Vst3ComponentHandlerProxy::ConstructArgs component_handler_proxy_args;
template <typename S>
void serialize(S& s) {
s.value8b(instance_id);
s.ext(component_handler_proxy_args, bitsery::ext::StdOptional{});
s.object(component_handler_proxy_args);
}
};