From 32344d9b14225c41d97ba674885dbaef45b04b64 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 28 Aug 2014 08:11:21 -0700 Subject: [PATCH] Comment --- format.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/format.cc b/format.cc index 4690d144..04e64bf7 100644 --- a/format.cc +++ b/format.cc @@ -230,7 +230,7 @@ class PrecisionHandler : } }; -// Converts an integer argument to type T. +// Converts an integer argument to an integral type T for printf. template class ArgConverter : public fmt::internal::ArgVisitor, void> { private: @@ -246,6 +246,7 @@ class ArgConverter : public fmt::internal::ArgVisitor, void> { bool is_signed = type_ == 'd' || type_ == 'i'; using fmt::internal::Arg; if (sizeof(T) <= sizeof(int)) { + // Extra casts are used to silence warnings. if (is_signed) { arg_.type = Arg::INT; arg_.int_value = static_cast(static_cast(value)); @@ -268,7 +269,7 @@ class ArgConverter : public fmt::internal::ArgVisitor, void> { } }; -// Converts an integer argument to char. +// Converts an integer argument to char for printf. class CharConverter : public fmt::internal::ArgVisitor { private: fmt::internal::Arg &arg_;