mirror of
https://github.com/AxioDL/boo.git
synced 2025-05-14 11:21:20 +00:00
AudioMatrix/Submix: static_cast INT_MAX to float
This commit is contained in:
parent
89e4a18d0b
commit
7acefc6c60
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user