Gui: Eliminate signed-to-unsigned comparison
`std::numeric_limits<int>::max()` can losslessly be cast to an unsigned int to silence the compiler warning about comparison of signed to unsigned.
This commit is contained in:
committed by
Benjamin Nauck
parent
eaff709d82
commit
87f3d6bb40
@@ -319,7 +319,7 @@ public:
|
||||
in = int_limits::max();
|
||||
} else if ( v == 0 ) {
|
||||
in = int_limits::min();
|
||||
} else if ( v > int_limits::max() ) {
|
||||
} else if ( v > static_cast<unsigned int>(int_limits::max()) ) {
|
||||
v += int_limits::min();
|
||||
in = static_cast<int>(v);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user