From ebff26f8f17a1097e7c02afbf7c13856068db938 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 19 May 2016 13:36:00 -0700 Subject: [PATCH] Improve formatting consistency --- fmt/format.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fmt/format.h b/fmt/format.h index b1254029..ab675f35 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -911,10 +911,10 @@ class ThousandsSep { }; // Returns the thousands separator for the current locale. -// On android the lconv structure is stubbed using an empty structure -// The test is for the size only, not for the presense of +// On android the lconv structure is stubbed using an empty structure. +// The test is for the size only, not for the presense of // thousands_sep in std::lconv, because if one would add thousands_sep -// at some point, the size of structure would be at least sizeof(char*) +// at some point, the size of structure would be at least sizeof(char*). template= sizeof(char*))> struct Locale { static fmt::StringRef thousands_sep() { return ""; } @@ -922,7 +922,9 @@ struct Locale { template struct Locale { - static fmt::StringRef thousands_sep() { return static_cast(std::localeconv())->thousands_sep; } + static fmt::StringRef thousands_sep() { + return static_cast(std::localeconv())->thousands_sep; + } }; // Formats a decimal unsigned integer value writing into buffer. @@ -2793,8 +2795,7 @@ void BasicWriter::write_int(T value, Spec spec) { } case 'n': { unsigned num_digits = internal::count_digits(abs_value); - fmt::StringRef sep = - internal::Locale::thousands_sep(); + fmt::StringRef sep = internal::Locale::thousands_sep(); unsigned size = static_cast( num_digits + sep.size() * (num_digits - 1) / 3); CharPtr p = prepare_int_buffer(size, spec, prefix, prefix_size) + 1;