From c62c47529137bb9cf3653a39866e3e86063f9f32 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 8 Sep 2013 14:25:22 -0700 Subject: [PATCH] Fix a warning. --- format.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/format.cc b/format.cc index f00833ec..92791f7f 100644 --- a/format.cc +++ b/format.cc @@ -598,14 +598,15 @@ void fmt::BasicFormatter::DoFormat() { typedef typename BasicWriter::CharPtr CharPtr; CharPtr out = CharPtr(); if (spec.width_ > 1) { + Char fill = static_cast(spec.fill()); out = writer.GrowBuffer(spec.width_); if (spec.align_ == ALIGN_RIGHT) { - std::fill_n(out, spec.width_ - 1, spec.fill_); + std::fill_n(out, spec.width_ - 1, fill); out += spec.width_ - 1; } else if (spec.align_ == ALIGN_CENTER) { - out = writer.FillPadding(out, spec.width_, 1, spec.fill_); + out = writer.FillPadding(out, spec.width_, 1, fill); } else { - std::fill_n(out + 1, spec.width_ - 1, spec.fill_); + std::fill_n(out + 1, spec.width_ - 1, fill); } } else { out = writer.GrowBuffer(1);