yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

cubeb_sink: Use static_cast instead of reinterpret_cast in DataCallback()

Conversions from void* to the proper data type are well-defined and
supported by static_cast. We don't need to use reinterpret_cast here.
This commit is contained in:
Lioncash 2020-09-25 17:09:59 -04:00
parent 4d4afc1502
commit 4073931305
1 changed files with 2 additions and 2 deletions

View File

@ -192,8 +192,8 @@ SinkStream& CubebSink::AcquireSinkStream(u32 sample_rate, u32 num_channels,
long CubebSinkStream::DataCallback(cubeb_stream* stream, void* user_data, const void* input_buffer,
void* output_buffer, long num_frames) {
CubebSinkStream* impl = static_cast<CubebSinkStream*>(user_data);
u8* buffer = reinterpret_cast<u8*>(output_buffer);
auto* impl = static_cast<CubebSinkStream*>(user_data);
auto* buffer = static_cast<u8*>(output_buffer);
if (!impl) {
return {};