Skip to content

Commit a6bbe0e

Browse files
authored
fix warning of level 4: (jbeder#971)
convert.h line130 : warning C4244 conversation from int to T possible loss of data
1 parent 98acc5a commit a6bbe0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/yaml-cpp/node/convert.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ ConvertStreamTo(std::stringstream& stream, T& rhs) {
127127
if ((stream >> std::noskipws >> num) && (stream >> std::ws).eof()) {
128128
if (num >= (std::numeric_limits<T>::min)() &&
129129
num <= (std::numeric_limits<T>::max)()) {
130-
rhs = num;
130+
rhs = (T)num;
131131
return true;
132132
}
133133
}

0 commit comments

Comments
 (0)