diff --git a/src/common/events.h b/src/common/events.h index c6d670f0..5fd8cacc 100644 --- a/src/common/events.h +++ b/src/common/events.h @@ -215,9 +215,7 @@ void passthrough_event(boost::asio::local::stream_protocol::socket& socket, // returning structs, but in this case the value returned from // the callback function is actually a pointer to a // `VstTimeInfo` struct! - // TODO: Use the fancy new VstTimeInfo variant here - return std::string(reinterpret_cast(return_value), - sizeof(VstTimeInfo)); + return *reinterpret_cast(return_value); }, [&](WantsString&) -> EventResposnePayload { return std::string(static_cast(data)); diff --git a/src/wine-host/plugin-bridge.cpp b/src/wine-host/plugin-bridge.cpp index 0586acdf..422e97f4 100644 --- a/src/wine-host/plugin-bridge.cpp +++ b/src/wine-host/plugin-bridge.cpp @@ -230,13 +230,7 @@ class HostCallbackDataConverter : DefaultDataConverter { case audioMasterGetTime: // Write the returned `VstTimeInfo` struct into a field and make // the function return a poitner to it in the function below - // TODO: Use the fancy new `VstTimeINfo` variant here - { - std::string buffer = - std::get(response.payload); - time = *static_cast( - static_cast(buffer.data())); - } + time = std::get(response.payload); break; default: DefaultDataConverter::write(opcode, data, response);