fix warning of level 4: (#971)

convert.h line130 : warning C4244 conversation from int to T possible loss of data
This commit is contained in:
t.t 2021-01-05 15:40:28 +02:00 committed by GitHub
parent 98acc5a887
commit a6bbe0e50a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,7 @@ ConvertStreamTo(std::stringstream& stream, T& rhs) {
if ((stream >> std::noskipws >> num) && (stream >> std::ws).eof()) {
if (num >= (std::numeric_limits<T>::min)() &&
num <= (std::numeric_limits<T>::max)()) {
rhs = num;
rhs = (T)num;
return true;
}
}