Refactor to allow MSVC without #define NOMINMAX (#905)
This commit is contained in:
parent
97d1ae547c
commit
27d8a0e302
@ -120,8 +120,8 @@ typename std::enable_if<(std::is_same<T, unsigned char>::value ||
|
|||||||
ConvertStreamTo(std::stringstream& stream, T& rhs) {
|
ConvertStreamTo(std::stringstream& stream, T& rhs) {
|
||||||
int num;
|
int num;
|
||||||
if ((stream >> std::noskipws >> num) && (stream >> std::ws).eof()) {
|
if ((stream >> std::noskipws >> num) && (stream >> std::ws).eof()) {
|
||||||
if (num >= std::numeric_limits<T>::min() &&
|
if (num >= (std::numeric_limits<T>::min)() &&
|
||||||
num <= std::numeric_limits<T>::max()) {
|
num <= (std::numeric_limits<T>::max)()) {
|
||||||
rhs = num;
|
rhs = num;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user