Unverified Commit a6bbe0e5 authored by t.t's avatar t.t Committed by GitHub
Browse files

fix warning of level 4: (#971)

convert.h line130 : warning C4244 conversation from int to T possible loss of data
parent 98acc5a8
...@@ -127,7 +127,7 @@ ConvertStreamTo(std::stringstream& stream, T& rhs) { ...@@ -127,7 +127,7 @@ ConvertStreamTo(std::stringstream& stream, T& rhs) {
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 = (T)num;
return true; return true;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment