diff options
author | Filip Gawin <[email protected]> | 2019-01-08 19:42:44 +0100 |
---|---|---|
committer | Filip Gawin <[email protected]> | 2019-01-08 19:42:44 +0100 |
commit | 0d3a0635d946ab1f43fd98cec4882248bc990846 (patch) | |
tree | f9cade218fe90b815bf1b529607fadd7bfa0f656 /Alc/mixer/mixer_c.cpp | |
parent | 2a7f27ca58f9897be06fe815a46ea76a01734a0b (diff) |
Avoid using old style casts
To think about:
examples/alffplay.cpp:600
OpenAL32/Include/alMain.h:295
Diffstat (limited to 'Alc/mixer/mixer_c.cpp')
-rw-r--r-- | Alc/mixer/mixer_c.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/mixer/mixer_c.cpp b/Alc/mixer/mixer_c.cpp index 31a5cee4..1b16b733 100644 --- a/Alc/mixer/mixer_c.cpp +++ b/Alc/mixer/mixer_c.cpp @@ -46,7 +46,7 @@ const ALfloat *Resample_copy_C(const InterpState* UNUSED(state), ASSUME(numsamples > 0); #if defined(HAVE_SSE) || defined(HAVE_NEON) /* Avoid copying the source data if it's aligned like the destination. */ - if((((intptr_t)src)&15) == (((intptr_t)dst)&15)) + if((reinterpret_cast<intptr_t>(src)&15) == (reinterpret_cast<intptr_t>(dst)&15)) return src; #endif std::copy_n(src, numsamples, dst); @@ -137,7 +137,7 @@ void Mix_C(const ALfloat *data, ALsizei OutChans, ALfloat (*RESTRICT OutBuffer)[ ASSUME(OutChans > 0); ASSUME(BufferSize > 0); - const ALfloat delta{(Counter > 0) ? 1.0f/(ALfloat)Counter : 0.0f}; + const ALfloat delta{(Counter > 0) ? 1.0f / static_cast<ALfloat>(Counter) : 0.0f}; for(ALsizei c{0};c < OutChans;c++) { ALsizei pos{0}; |