diff options
| author | 2020-09-25 17:09:59 -0400 | |
|---|---|---|
| committer | 2020-09-25 17:10:02 -0400 | |
| commit | 407393130589abe4d68ab7e144a4a74fe58e1b5a (patch) | |
| tree | 26b8c3074a95c670757e29c2a727ebafe8cbcc0e /src | |
| parent | Merge pull request #4717 from lioncash/debug (diff) | |
| download | yuzu-407393130589abe4d68ab7e144a4a74fe58e1b5a.tar.gz yuzu-407393130589abe4d68ab7e144a4a74fe58e1b5a.tar.xz yuzu-407393130589abe4d68ab7e144a4a74fe58e1b5a.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio_core/cubeb_sink.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/audio_core/cubeb_sink.cpp b/src/audio_core/cubeb_sink.cpp index 83c06c0ed..eb82791f6 100644 --- a/src/audio_core/cubeb_sink.cpp +++ b/src/audio_core/cubeb_sink.cpp | |||
| @@ -192,8 +192,8 @@ SinkStream& CubebSink::AcquireSinkStream(u32 sample_rate, u32 num_channels, | |||
| 192 | 192 | ||
| 193 | long CubebSinkStream::DataCallback(cubeb_stream* stream, void* user_data, const void* input_buffer, | 193 | long CubebSinkStream::DataCallback(cubeb_stream* stream, void* user_data, const void* input_buffer, |
| 194 | void* output_buffer, long num_frames) { | 194 | void* output_buffer, long num_frames) { |
| 195 | CubebSinkStream* impl = static_cast<CubebSinkStream*>(user_data); | 195 | auto* impl = static_cast<CubebSinkStream*>(user_data); |
| 196 | u8* buffer = reinterpret_cast<u8*>(output_buffer); | 196 | auto* buffer = static_cast<u8*>(output_buffer); |
| 197 | 197 | ||
| 198 | if (!impl) { | 198 | if (!impl) { |
| 199 | return {}; | 199 | return {}; |