From e20be84471ee10a413b89110a19ef63200f5eee1 Mon Sep 17 00:00:00 2001 From: Sam4uk Date: Sun, 6 Feb 2022 16:29:54 +0200 Subject: [PATCH] -Werror=old-style-cast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit use of old-style cast to ‘T’ [-Werror=old-style-cast] 131 | rhs = (T)num; --- 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 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; } }