From f4520821ef4b9af6d5cb9800ff756e327f273669 Mon Sep 17 00:00:00 2001 From: Brick <6098371+0x1F9F1@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:28:44 +0100 Subject: [PATCH] Removed some unnecessary integer casts --- src/audio/SDL_audiotypecvt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/SDL_audiotypecvt.c b/src/audio/SDL_audiotypecvt.c index 33c3abd40..416e9ab91 100644 --- a/src/audio/SDL_audiotypecvt.c +++ b/src/audio/SDL_audiotypecvt.c @@ -74,7 +74,7 @@ static void SDL_Convert_U8_to_F32_Scalar(float *dst, const Uint8 *src, int num_s /* 1) Construct a float in the range [65536.0, 65538.0) * 2) Shift the float range to [-1.0, 1.0) */ union float_bits x; - x.u32 = (Uint8)src[i] ^ 0x47800000u; + x.u32 = src[i] ^ 0x47800000u; dst[i] = x.f32 - 65537.0f; } } @@ -190,7 +190,7 @@ static void SDL_Convert_F32_to_S32_Scalar(Sint32 *dst, const float *src, int num z &= SIGNMASK(y ^ z); x.u32 = y - z; - dst[i] = (Sint32)((Uint32)(Sint32)x.f32 ^ SIGNMASK(z)); + dst[i] = (Sint32)x.f32 ^ (Sint32)SIGNMASK(z); } }