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 /OpenAL32/alListener.cpp | |
parent | 2a7f27ca58f9897be06fe815a46ea76a01734a0b (diff) |
Avoid using old style casts
To think about:
examples/alffplay.cpp:600
OpenAL32/Include/alMain.h:295
Diffstat (limited to 'OpenAL32/alListener.cpp')
-rw-r--r-- | OpenAL32/alListener.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenAL32/alListener.cpp b/OpenAL32/alListener.cpp index 7ed36f14..14fc58fc 100644 --- a/OpenAL32/alListener.cpp +++ b/OpenAL32/alListener.cpp @@ -169,7 +169,7 @@ AL_API void AL_APIENTRY alListener3i(ALenum param, ALint value1, ALint value2, A { case AL_POSITION: case AL_VELOCITY: - alListener3f(param, (ALfloat)value1, (ALfloat)value2, (ALfloat)value3); + alListener3f(param, static_cast<ALfloat>(value1), static_cast<ALfloat>(value2), static_cast<ALfloat>(value3)); return; } @@ -194,16 +194,16 @@ AL_API void AL_APIENTRY alListeneriv(ALenum param, const ALint *values) { case AL_POSITION: case AL_VELOCITY: - alListener3f(param, (ALfloat)values[0], (ALfloat)values[1], (ALfloat)values[2]); + alListener3f(param, static_cast<ALfloat>(values[0]), static_cast<ALfloat>(values[1]), static_cast<ALfloat>(values[2])); return; case AL_ORIENTATION: - fvals[0] = (ALfloat)values[0]; - fvals[1] = (ALfloat)values[1]; - fvals[2] = (ALfloat)values[2]; - fvals[3] = (ALfloat)values[3]; - fvals[4] = (ALfloat)values[4]; - fvals[5] = (ALfloat)values[5]; + fvals[0] = static_cast<ALfloat>(values[0]); + fvals[1] = static_cast<ALfloat>(values[1]); + fvals[2] = static_cast<ALfloat>(values[2]); + fvals[3] = static_cast<ALfloat>(values[3]); + fvals[4] = static_cast<ALfloat>(values[4]); + fvals[5] = static_cast<ALfloat>(values[5]); alListenerfv(param, fvals); return; } @@ -345,15 +345,15 @@ AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *valu else switch(param) { case AL_POSITION: - *value1 = (ALint)listener.Position[0]; - *value2 = (ALint)listener.Position[1]; - *value3 = (ALint)listener.Position[2]; + *value1 = static_cast<ALint>(listener.Position[0]); + *value2 = static_cast<ALint>(listener.Position[1]); + *value3 = static_cast<ALint>(listener.Position[2]); break; case AL_VELOCITY: - *value1 = (ALint)listener.Velocity[0]; - *value2 = (ALint)listener.Velocity[1]; - *value3 = (ALint)listener.Velocity[2]; + *value1 = static_cast<ALint>(listener.Velocity[0]); + *value2 = static_cast<ALint>(listener.Velocity[1]); + *value3 = static_cast<ALint>(listener.Velocity[2]); break; default: @@ -383,12 +383,12 @@ AL_API void AL_APIENTRY alGetListeneriv(ALenum param, ALint* values) { case AL_ORIENTATION: // AT then UP - values[0] = (ALint)listener.OrientAt[0]; - values[1] = (ALint)listener.OrientAt[1]; - values[2] = (ALint)listener.OrientAt[2]; - values[3] = (ALint)listener.OrientUp[0]; - values[4] = (ALint)listener.OrientUp[1]; - values[5] = (ALint)listener.OrientUp[2]; + values[0] = static_cast<ALint>(listener.OrientAt[0]); + values[1] = static_cast<ALint>(listener.OrientAt[1]); + values[2] = static_cast<ALint>(listener.OrientAt[2]); + values[3] = static_cast<ALint>(listener.OrientUp[0]); + values[4] = static_cast<ALint>(listener.OrientUp[1]); + values[5] = static_cast<ALint>(listener.OrientUp[2]); break; default: |