From d7eee032725ed40f42387d25b2caaadce0a54004 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 8 Jan 2019 19:08:03 -0800 Subject: Replace a couple more C-style casts --- OpenAL32/Include/alMain.h | 2 +- examples/alffplay.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index f0771386..bea48296 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -292,7 +292,7 @@ inline int float2int(float f) noexcept #else - return (ALint)f; + return static_cast(f); #endif } diff --git a/examples/alffplay.cpp b/examples/alffplay.cpp index 11ff126d..0375aecc 100644 --- a/examples/alffplay.cpp +++ b/examples/alffplay.cpp @@ -596,9 +596,8 @@ int AudioState::decodeFrame() mSamplesMax = mDecodedFrame->nb_samples; } /* Return the amount of sample frames converted */ - int data_size = swr_convert(mSwresCtx.get(), &mSamples, mDecodedFrame->nb_samples, - (const uint8_t**)mDecodedFrame->data, mDecodedFrame->nb_samples - ); + int data_size{swr_convert(mSwresCtx.get(), &mSamples, mDecodedFrame->nb_samples, + const_cast(mDecodedFrame->data), mDecodedFrame->nb_samples)}; av_frame_unref(mDecodedFrame.get()); return data_size; -- cgit v1.2.3