From 88972f487b12a921ce1f910f903193525f9d09f3 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 8 Sep 2013 13:30:14 -0700 Subject: [PATCH] Fix warnings. --- format.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/format.cc b/format.cc index 71bd1ec2..cd9de152 100644 --- a/format.cc +++ b/format.cc @@ -304,6 +304,7 @@ void fmt::BasicWriter::FormatDouble( *format_ptr = '\0'; // Format using snprintf. + Char fill = static_cast(spec.fill()); for (;;) { std::size_t size = buffer_.capacity() - offset; Char *start = &buffer_[offset]; @@ -316,7 +317,7 @@ void fmt::BasicWriter::FormatDouble( *(start - 1) = sign; sign = 0; } else { - *(start - 1) = spec.fill(); + *(start - 1) = fill; } ++n; } @@ -325,12 +326,12 @@ void fmt::BasicWriter::FormatDouble( unsigned width = spec.width(); CharPtr p = GrowBuffer(width); std::copy(p, p + n, p + (width - n) / 2); - FillPadding(p, spec.width(), n, spec.fill()); + FillPadding(p, spec.width(), n, fill); return; } if (spec.fill() != ' ' || sign) { while (*start == ' ') - *start++ = spec.fill(); + *start++ = fill; if (sign) *(start - 1) = sign; }