Qt: Fix saturateCast signed check

This commit is contained in:
Vicki Pfau 2023-05-03 06:55:17 -07:00
parent d8643870d6
commit 00d1c0dc9d
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ constexpr const T& clamp(const T& v, const T& lo, const T& hi) {
template<typename T, typename U>
constexpr T saturateCast(U value) {
if (std::numeric_limits<T>::is_signed == std::numeric_limits<T>::is_signed) {
if (std::numeric_limits<T>::is_signed == std::numeric_limits<U>::is_signed) {
if (value > std::numeric_limits<T>::max()) {
return std::numeric_limits<T>::max();
}