mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user