diff --git a/include/yaml-cpp/node/convert.h b/include/yaml-cpp/node/convert.h index 21619a4..8ab0cd4 100644 --- a/include/yaml-cpp/node/convert.h +++ b/include/yaml-cpp/node/convert.h @@ -128,7 +128,7 @@ ConvertStreamTo(std::stringstream& stream, T& rhs) { if ((stream >> std::noskipws >> num) && (stream >> std::ws).eof()) { if (num >= (std::numeric_limits::min)() && num <= (std::numeric_limits::max)()) { - rhs = (T)num; + rhs = static_cast(num); return true; } }