diff options
author | Chris Robinson <[email protected]> | 2019-01-08 19:08:03 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-01-08 19:08:03 -0800 |
commit | d7eee032725ed40f42387d25b2caaadce0a54004 (patch) | |
tree | 415e187ce5f2f698913fd0f84ba1b66a0d91a633 | |
parent | 0763dfa9544e6d1013641d3c76d321e7aab74b7d (diff) |
Replace a couple more C-style casts
-rw-r--r-- | OpenAL32/Include/alMain.h | 2 | ||||
-rw-r--r-- | 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<ALint>(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<const uint8_t**>(mDecodedFrame->data), mDecodedFrame->nb_samples)}; av_frame_unref(mDecodedFrame.get()); return data_size; |