From 043c5da51c9731ec783ba78b4a4deb25a3d8a597 Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Fri, 29 Nov 2019 20:57:47 -0500 Subject: [PATCH] Clean-up sign-conversion warnings (4 of n) --- include/fmt/format.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index e57b2b2c..2ada7e15 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1216,7 +1216,7 @@ int snprintf_float(T value, int precision, float_specs specs, buffer& buf); template T promote_float(T value) { return value; } -inline double promote_float(float value) { return value; } +inline double promote_float(float value) { return static_cast(value); } template FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) { @@ -2599,11 +2599,11 @@ class format_string_checker { FMT_CONSTEXPR void on_text(const Char*, const Char*) {} FMT_CONSTEXPR void on_arg_id() { - arg_id_ = context_.next_arg_id(); + arg_id_ = static_cast(context_.next_arg_id()); check_arg_id(); } FMT_CONSTEXPR void on_arg_id(int id) { - arg_id_ = id; + arg_id_ = static_cast(id); context_.check_arg_id(id); check_arg_id(); }