Fix more warnings.

This commit is contained in:
Victor Zverovich
2013-09-08 13:47:06 -07:00
parent 88972f487b
commit 563a575c0c
2 changed files with 11 additions and 8 deletions
+4 -3
View File
@@ -558,13 +558,14 @@ typename BasicWriter<Char>::CharPtr BasicWriter<Char>::FormatString(
CharPtr out = CharPtr();
if (spec.width() > size) {
out = GrowBuffer(spec.width());
Char fill = static_cast<Char>(spec.fill());
if (spec.align() == ALIGN_RIGHT) {
std::fill_n(out, spec.width() - size, spec.fill());
std::fill_n(out, spec.width() - size, fill);
out += spec.width() - size;
} else if (spec.align() == ALIGN_CENTER) {
out = FillPadding(out, spec.width(), size, spec.fill());
out = FillPadding(out, spec.width(), size, fill);
} else {
std::fill_n(out + size, spec.width() - size, spec.fill());
std::fill_n(out + size, spec.width() - size, fill);
}
} else {
out = GrowBuffer(size);