aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-04-26 18:10:24 -0700
committerChris Robinson <[email protected]>2023-04-26 18:10:24 -0700
commitaaa0460b5e6520e53648eba12083e2ba2cb145d5 (patch)
treef94c43098c4948e264f380ce86e2f67d7b0d7f7d
parentac143e1236319ea087388ff48a178930c0dbaf47 (diff)
Cast a value to the expected type for MSVC
-rw-r--r--core/voice.cpp4
1 files 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<FmtIMA4>(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<FmtIMA4>(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;
};