mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-04 10:33:30 +00:00
UI: Fix implicit conversion warning on Linux with Clang
This commit is contained in:
parent
323d2f60da
commit
6dd99e3a9f
|
@ -1077,7 +1077,8 @@ inline int VolumeMeter::convertToInt(float number)
|
|||
constexpr int min = std::numeric_limits<int>::min();
|
||||
constexpr int max = std::numeric_limits<int>::max();
|
||||
|
||||
if (number > max)
|
||||
// NOTE: Conversion from 'const int' to 'float' changes max value from 2147483647 to 2147483648
|
||||
if (number >= (float)max)
|
||||
return max;
|
||||
else if (number < min)
|
||||
return min;
|
||||
|
|
Loading…
Reference in a new issue