AudioMatrix/Submix: static_cast INT_MAX to float

This commit is contained in:
Luke Street 2020-04-19 00:07:57 -04:00
parent 89e4a18d0b
commit 7acefc6c60
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ static inline int16_t Clamp16(float in) {
static inline int32_t Clamp32(float in) { static inline int32_t Clamp32(float in) {
if (in < INT_MIN) if (in < INT_MIN)
return INT_MIN; return INT_MIN;
else if (in > INT_MAX) else if (in > static_cast<float>(INT_MAX))
return INT_MAX; return INT_MAX;
return in; return in;
} }

View File

@ -101,7 +101,7 @@ constexpr T ClampInt(float in) {
if (in < MIN) if (in < MIN)
return MIN; return MIN;
else if (in > MAX) else if (in > static_cast<float>(MAX))
return MAX; return MAX;
else else
return in; return in;