From aaa0460b5e6520e53648eba12083e2ba2cb145d5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 26 Apr 2023 18:10:24 -0700 Subject: Cast a value to the expected type for MSVC --- core/voice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/voice.cpp b/core/voice.cpp index e8fbcccd..35e03809 100644 --- a/core/voice.cpp +++ b/core/voice.cpp @@ -296,7 +296,7 @@ inline void LoadSamples(float *RESTRICT dstSamples, const al::byte *src int index{src[srcChan*4 + 2] | (src[srcChan*4 + 3] << 8)}; sample = (sample^0x8000) - 32768; - index = clampi((index^0x8000) - 32768, 0, al::size(IMAStep_size)-1); + index = clampi((index^0x8000) - 32768, 0, int{al::size(IMAStep_size)}-1); if(skip == 0) { @@ -312,7 +312,7 @@ inline void LoadSamples(float *RESTRICT dstSamples, const al::byte *src sample = clampi(sample, -32768, 32767); index += IMA4Index_adjust[nibble]; - index = clampi(index, 0, al::size(IMAStep_size)-1); + index = clampi(index, 0, int{al::size(IMAStep_size)}-1); return sample; }; -- cgit v1.2.3