From 34185a43a7fae40f32246d663982449432772c8a Mon Sep 17 00:00:00 2001 From: Aleksander Kosarskii Date: Mon, 30 Jan 2023 13:23:51 +0500 Subject: [PATCH] style : change c-style cast to static_cast --- include/yaml-cpp/emitter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/yaml-cpp/emitter.h b/include/yaml-cpp/emitter.h index c58d227..f0cd2d8 100644 --- a/include/yaml-cpp/emitter.h +++ b/include/yaml-cpp/emitter.h @@ -178,7 +178,7 @@ inline Emitter& Emitter::WriteStreamable(T value) { } } - if ((float)((int) value ) == value ){ + if (static_cast(static_cast(value)) == value){ stream << std::fixed << std::setprecision(1) << value; }else if (!special) { stream << value;