From 53912c22d2aeef25df2e3e4aa27179f25b76ab76 Mon Sep 17 00:00:00 2001 From: TA Date: Tue, 5 Jan 2021 12:52:19 +0200 Subject: [PATCH] fix warning of level 4: convert.h line130 : warning C4244 conversation from int to T possible loss of data --- include/yaml-cpp/node/convert.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/yaml-cpp/node/convert.h b/include/yaml-cpp/node/convert.h index b2f46f0..596898d 100644 --- a/include/yaml-cpp/node/convert.h +++ b/include/yaml-cpp/node/convert.h @@ -127,7 +127,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 = num; + rhs = (T)num; return true; } }