mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-10 06:12:14 +02:00
Use designated initializers for complex structs
This was one of the main reasons why I wanted to switch to C++20, I just forgot to do it.
This commit is contained in:
@@ -166,8 +166,9 @@ GroupHost::GroupHost(
|
||||
boost::asio::local::stream_protocol::socket group_socket(io_context);
|
||||
group_socket.connect(group_socket_path.string());
|
||||
|
||||
write_object(group_socket, GroupRequest{plugin_path.string(),
|
||||
socket_endpoint.string()});
|
||||
write_object(group_socket,
|
||||
GroupRequest{.plugin_path = plugin_path.string(),
|
||||
.socket_path = socket_endpoint.string()});
|
||||
const auto response = read_object<GroupResponse>(group_socket);
|
||||
|
||||
host_pid = response.pid;
|
||||
@@ -202,9 +203,10 @@ GroupHost::GroupHost(
|
||||
io_context);
|
||||
group_socket.connect(group_socket_path.string());
|
||||
|
||||
write_object(group_socket,
|
||||
GroupRequest{plugin_path.string(),
|
||||
socket_endpoint.string()});
|
||||
write_object(
|
||||
group_socket,
|
||||
GroupRequest{.plugin_path = plugin_path.string(),
|
||||
.socket_path = socket_endpoint.string()});
|
||||
const auto response =
|
||||
read_object<GroupResponse>(group_socket);
|
||||
|
||||
|
||||
@@ -155,7 +155,9 @@ PluginBridge::PluginBridge(audioMasterCallback host_callback)
|
||||
|
||||
incoming_midi_events.push_back(
|
||||
std::get<DynamicVstEvents>(event.payload));
|
||||
EventResult response{1, nullptr, std::nullopt};
|
||||
EventResult response{.return_value = 1,
|
||||
.payload = nullptr,
|
||||
.value_payload = std::nullopt};
|
||||
|
||||
return response;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user