From a6bbe0e50ac4074f0b9b44188c28cf00caf1a723 Mon Sep 17 00:00:00 2001 From: "t.t" <39879341+tomeravi@users.noreply.github.com> Date: Tue, 5 Jan 2021 15:40:28 +0200 Subject: [PATCH] fix warning of level 4: (#971) 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; } }